tag:help.beatunes.com,2009-07-24:/discussions/problems/68550-restore-ratings-from-beatunesbeaTunes: Discussion 2022-05-16T12:35:28Ztag:help.beatunes.com,2009-07-24:Comment/540736522022-05-01T07:24:34Z2022-05-01T07:24:34ZRestore ratings from Beatunes<div><p>If they are still in beaTunes (i.e. no sync occurred), you’d have to script a solution.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/540736522022-05-01T17:51:00Z2022-05-01T17:51:01ZRestore ratings from Beatunes<div><p>Hendrik, I assume you mean apple script (never used) vs. bash (extensive experience). Is there any documentation you can point me to that would explain what to script against in beatunes?</p>
<p>Also, I do use time machine. Is there anything I can restore using TM to get the track ratings back?</p></div>Brian Htag:help.beatunes.com,2009-07-24:Comment/540736522022-05-01T18:14:18Z2022-05-01T18:14:18ZRestore ratings from Beatunes<div><blockquote>
<p>I assume you mean apple script (never used) vs. bash (extensive experience). Is there any documentation you can point me to that would explain what to script against in beatunes?</p>
</blockquote>
<p>No, I meant <a href="https://www.beatunes.com/en/beatlet-getting-started.html">https://www.beatunes.com/en/beatlet-getting-started.html</a></p>
<blockquote>
<p>Also, I do use time machine. Is there anything I can restore using TM to get the track ratings back?</p>
</blockquote>
<p>That might be the smarter approach. I.e. trying to restore earlier versions of both your files and the iTunes/Music databases.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/540736522022-05-01T18:27:23Z2022-05-01T18:27:25ZRestore ratings from Beatunes<div><p>Right, regarding the TM solution, I was under the impression track ratings were written to the database, not the file, is that your understanding? If it's the database, how do I restore that? Is it a flat file somewhere?</p></div>Brian Htag:help.beatunes.com,2009-07-24:Comment/540736522022-05-02T12:29:22Z2022-05-02T12:29:22ZRestore ratings from Beatunes<div><p>Frankly, I don't know for sure from the top of my head, whether iTunes/Music writes ratings to the files or not (I'm sure, it <em>could</em>). If it does, restoring just the database won't help, because it would probably re-import whatever is in the file, as soon as it's played.</p>
<p>The iTunes/Music database files are in <code>~/Music</code> (<code>.itdb</code> and <code>.itl</code> files). I have never messed much with them, but reverting to older versions <em>while iTunes/Music is not running</em>, <em>should</em> work. Emphasis on <em>should</em>.</p>
<p>Please let me know, how this worked out!</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/540736522022-05-02T17:19:57Z2022-05-02T17:19:58ZRestore ratings from Beatunes<div><p>Hendrik, I quit Music, killed any music related processes, then restored the contents of ~/Music/Music/Music Library.musiclibrary/. It didn't restore the ratings. I then restored a single file and that also did not bring back my previous track rating. I used the strings against the mp3 (metadata is usually in the first 10 lines) and found nothing related to ratings. I also examined a file with VLC and found no metadata for ratings.</p>
<p>I think at this point I need to somehow sync my beatunes cached ratings to Music.</p></div>Brian Htag:help.beatunes.com,2009-07-24:Comment/540736522022-05-03T15:23:38Z2022-05-03T15:23:38ZRestore ratings from Beatunes<div><p>Hm. Weird.</p>
<blockquote>
<p>I then restored a single file and that also did not bring back my previous track rating.</p>
</blockquote>
<p>Did you play the file? Music tends to only read a file once it's played.</p>
<blockquote>
<p>metadata is usually in the first 10 lines</p>
</blockquote>
<p>Depends on the ID3 version.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/540736522022-05-03T15:30:43Z2022-05-03T15:30:49ZRestore ratings from Beatunes<div><p>Yep, I played both copies of the file and some others, but no update in the track rating. I also rebooted my system, hoping to shed something that might still have been in memory.</p>
<p>So, is it possible to sync track ratings FROM beatunes TO Music?</p></div>Briantag:help.beatunes.com,2009-07-24:Comment/540736522022-05-03T15:36:33Z2022-05-03T15:36:33ZRestore ratings from Beatunes<div><blockquote>
<p>So, is it possible to sync track ratings FROM beatunes TO Music?</p>
</blockquote>
<p>Not out of the box.</p>
<p>If you still have the old ratings in beaTunes somehow, you could write a <a href="https://www.beatunes.com/en/beatlet-librarybatchaction.html">LibraryBatchAction</a> that takes the beaTunes rating and tells Music about it. LibraryBatchActions are basically pieces of code that are applied to every entry in your library (so be careful!). You can code them in one of a couple of languages.</p>
<p>Feel free to play around with it. If you have time, I might be able to code that up in the next couple of days.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/540736522022-05-03T15:50:38Z2022-05-03T15:50:41ZRestore ratings from Beatunes<div><p>Thanks. However, I do not write code. I can write shell scripts and some very basic perl, but that is it. I looked through some of the documentation on the site and it's way over my head. If there were some specific calls you could point me to, that might help, but otherwise, I have no idea where to start. I'll probably sort my 18k tracks by play count and go through them one at a time and guesstimate a track rating.</p></div>Briantag:help.beatunes.com,2009-07-24:Comment/540736522022-05-03T16:38:46Z2022-05-03T16:38:46ZRestore ratings from Beatunes<div><p>As I said, or at least tried to say:</p>
<p>if you can wait a couple of days, I can code that for you.</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/540736522022-05-03T18:30:02Z2022-05-03T18:30:03ZRestore ratings from Beatunes<div><p>Hendrik, I didn't want to impose, but secretly was wishing that would happen. Thank you, I can absolutely wait.</p></div>Briantag:help.beatunes.com,2009-07-24:Comment/540736522022-05-05T20:36:10Z2022-05-05T20:36:10ZRestore ratings from Beatunes<div><p>Hey Brian,</p>
<p>please try to unzip the attached script and place it in the beaTunes <code>Plug-Ins</code> directory (see also <a href="http://help.beatunes.com/kb/plugins/how-to-install-a-plugin-or-beatlet">here</a>).</p>
<p>Then restart beaTunes and, if installed correctly, you should see a new menu item under <code>Tools</code>.</p>
<p>Now, DO NOT just click on that item.</p>
<p>First make sure, in the beaTunes general preferences, you have<br>
- Turned <em>off</em> embedding - Turned <em>on</em> force overwriting</p>
<p><em>Then ensure that your TM backup is up to date in case things go haywire.</em></p>
<p>Then click on that menu item ("Reset Ratings").</p>
<p>The script will run over all tracks in your library and attempt to write what's in the beaTunes database to Music/iTunes (if the rating has not been computed). This will take a while.</p>
<p>Hope it helps,</p>
<p>-hendrik</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/540736522022-05-05T21:48:34Z2022-05-05T21:48:34ZRestore ratings from Beatunes<div><p>That worked! Thank you so much!!!</p>
<p>Brian</p>
<pre>
<code>On Thursday, May 5, 2022, 01:36:09 PM PDT, hendrik <tender+da9017eec7@tenderapp.com> wrote:</code>
</pre>
<table>
<tr>
<td></td>
</tr>
</table></div>Brian Hostetlertag:help.beatunes.com,2009-07-24:Comment/540736522022-05-06T07:07:42Z2022-05-06T07:07:42ZRestore ratings from Beatunes<div><p>Rating restored and all?!<br>
Awesome. :-)</p>
<p>Have a great weekend,</p>
<p>-hendrik</p></div>hendriktag:help.beatunes.com,2009-07-24:Comment/540736522022-05-06T16:40:26Z2022-05-16T12:35:05ZRestore ratings from Beatunes<div><p>All rating restored and I manually removed the album ratings for good measure. My library is looking great! Thanks so much for your help and I hope you have good, safe weekend, too!</p>
<p>Brian</p>
<pre>
<code>On Friday, May 6, 2022, 12:07:45 AM PDT, hendrik <tender+da9017eec7@tenderapp.com> wrote:</code>
</pre>
<table>
<tr>
<td></td>
</tr>
</table></div>Brian Hostetlertag:help.beatunes.com,2009-07-24:Comment/540736522022-05-16T12:35:26Z2022-05-16T12:35:26ZRestore ratings from Beatunes<div><p>You're welcome.<br>
Glad I could help.</p>
<p>-hendrik</p></div>hendrik