Restore ratings from Beatunes
I was screwing around, trying to remove the album auto generated ratings, and accidentally removed all my track ratings (I have 18k tracks). Is there any way to write the ratings I have cached in beatunes back to Music app?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by hendrik on 01 May, 2022 07:24 AM
If they are still in beaTunes (i.e. no sync occurred), you’d have to script a solution.
2 Posted by Brian H on 01 May, 2022 05:51 PM
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?
Also, I do use time machine. Is there anything I can restore using TM to get the track ratings back?
Support Staff 3 Posted by hendrik on 01 May, 2022 06:14 PM
No, I meant https://www.beatunes.com/en/beatlet-getting-started.html
That might be the smarter approach. I.e. trying to restore earlier versions of both your files and the iTunes/Music databases.
4 Posted by Brian H on 01 May, 2022 06:27 PM
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?
Support Staff 5 Posted by hendrik on 02 May, 2022 12:29 PM
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 could). 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.
The iTunes/Music database files are in
~/Music
(.itdb
and.itl
files). I have never messed much with them, but reverting to older versions while iTunes/Music is not running, should work. Emphasis on should.Please let me know, how this worked out!
6 Posted by Brian H on 02 May, 2022 05:19 PM
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.
I think at this point I need to somehow sync my beatunes cached ratings to Music.
Support Staff 7 Posted by hendrik on 03 May, 2022 03:23 PM
Hm. Weird.
Did you play the file? Music tends to only read a file once it's played.
Depends on the ID3 version.
8 Posted by Brian on 03 May, 2022 03:30 PM
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.
So, is it possible to sync track ratings FROM beatunes TO Music?
Support Staff 9 Posted by hendrik on 03 May, 2022 03:36 PM
Not out of the box.
If you still have the old ratings in beaTunes somehow, you could write a LibraryBatchAction 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.
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.
10 Posted by Brian on 03 May, 2022 03:50 PM
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.
Support Staff 11 Posted by hendrik on 03 May, 2022 04:38 PM
As I said, or at least tried to say:
if you can wait a couple of days, I can code that for you.
12 Posted by Brian on 03 May, 2022 06:30 PM
Hendrik, I didn't want to impose, but secretly was wishing that would happen. Thank you, I can absolutely wait.
Support Staff 13 Posted by hendrik on 05 May, 2022 08:36 PM
Hey Brian,
please try to unzip the attached script and place it in the beaTunes
Plug-Ins
directory (see also here).Then restart beaTunes and, if installed correctly, you should see a new menu item under
Tools
.Now, DO NOT just click on that item.
First make sure, in the beaTunes general preferences, you have
- Turned off embedding - Turned on force overwriting
Then ensure that your TM backup is up to date in case things go haywire.
Then click on that menu item ("Reset Ratings").
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.
Hope it helps,
-hendrik
14 Posted by Brian Hostetler on 05 May, 2022 09:48 PM
That worked! Thank you so much!!!
Brian
On Thursday, May 5, 2022, 01:36:09 PM PDT, hendrik <[email blocked]> wrote:
|
Support Staff 15 Posted by hendrik on 06 May, 2022 07:07 AM
Rating restored and all?!
Awesome. :-)
Have a great weekend,
-hendrik
16 Posted by Brian Hostetler on 06 May, 2022 04:40 PM
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!
Brian
On Friday, May 6, 2022, 12:07:45 AM PDT, hendrik <[email blocked]> wrote:
|
Support Staff 17 Posted by hendrik on 16 May, 2022 12:35 PM
You're welcome.
Glad I could help.
-hendrik
hendrik closed this discussion on 16 May, 2022 12:35 PM.