shahed_ameer
05-06-2004, 03:04 AM
Song ratings are stored in the iTunes database, and not on the tags of each file. So that means, if somehow your database gets corrupted or if you want to move your songs from one computer to another, the ratings are lost.
What I do to "backup" the ratings is to copy the ratings to the grouping tag -- which IS written to the file.
Basically, I click on the ratings column to sort by ratings.
Then for all songs with a 5 star rating, I write 5 to the grouping.
Similarly, for all songs with a 4 star rating, I write a grouping of 4, etc.
I also created a smart playlist called "Need to update grouping" with properties: ratings is not "blank" & grouping is "blank". This smart playlist can be used to eaily identify songs whose ratings haven't been backed up to the grouping tag yet. You can select this playlist, sort by the ratings again, and update the groupings according to the rating.
Of course, all this assumes that you don't use the grouping tag for any other purpose. If you do, you can always choose to use any other tag. The concept is the same ... use a tag that actually gets written to the song file to back up your ratings.
Hope this helps... (it definitely gave me peace of mind that my ratings are safe)
- Shahed.
shahed_ameer
05-06-2004, 03:13 AM
In case it wasn't obvious... here's how to restore your ratings from the grouping tag:
1. Click on the grouping column to arrange your songs by the grouping tag.
2. Then select all the songs with grouping=5 and assign a rating of 5 to those songs
3. Repeat step (2) for all ratings.
jerrodh
05-06-2004, 10:01 PM
FYI, the Grouping Tag maps to the "Content group description" ID3 frame, should you ever need to find it in another program. :D
Thanks for posting that shahed_ameer, great idea.
pedx1ng
06-29-2004, 04:27 AM
This was a great idea, so I decided to whip up a JScript to automatically backup or restore ratings.
These scripts are for Windows and require iTunes 4.5 for the COM interface and possibly .NET
Here is the script for writing the ratings out to the Grouping tag:
/*
File: OutputRatingsToTag.js
Version: 1.0
Comments: Run this script to output iTunes ratings to the Grouping tag.
Warning! - this physically updates the source file with the new tag.
Don't run this if you use the Grouping tag for anything else.
Author: Ped Xing (pedx1ng@lycos.com)
*/
var ITTrackKindFile = 1;
var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = mainLibrary.Tracks;
var numTracks = tracks.Count;
var irating = 0;
while (numTracks != 0)
{
var currTrack = tracks.Item(numTracks);
// is this a file track?
if (currTrack.Kind == ITTrackKindFile)
{
irating = currTrack.Rating;
igrouping = currTrack.Grouping;
if ( (irating != 0) && (irating != (igrouping * 20)) )
{
try {
currTrack.Grouping = irating / 20;
}//try
catch(e) {
// do nothing
}
finally {
// do nothing
}
}
}
numTracks--;
}
WScript.Echo("Work complete.");
Here is the script for reading the ratings back in from the Grouping tag:
/*
File: ReadRatingsFromTag.js
Version: 1.0
Comments: This script reads in iTunes ratings from the Grouping tag.
This will only work if you have previously written iTunes
ratings to the Grouping tag using OutputRatingsToTag.js
Author: Ped Xing (pedx1ng@lycos.com)
*/
var ITTrackKindFile = 1;
var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = mainLibrary.Tracks;
var numTracks = tracks.Count;
var irating = 0;
while (numTracks != 0)
{
var currTrack = tracks.Item(numTracks);
// is this a file track?
if (currTrack.Kind == ITTrackKindFile)
{
irating = currTrack.Rating;
igrouping = currTrack.Grouping;
if ( (igrouping >= 1) && (igrouping <=5) && (irating != (igrouping * 20)) )
{
try {
currTrack.Rating = igrouping * 20;
}//try
catch(e) {
// do nothing
}
finally {
// do nothing
}
}
}
numTracks--;
}
WScript.Echo("Work complete.");
These scripts are pretty basic without intensive error checking. I have tested it on my 9000+ song library successfully, but I won't be held responsible if it doesn't work for you.
pedx1ng
06-29-2004, 04:29 AM
Oh yeah, in case it wasn't obvious, you are supposed to copy and paste the code to two seperate files:
OutputRatingsToTag.js and ReadRatingsFromTag.js
To run the script you just double-click the file for whichever script you want to run.
mongoos150
07-12-2005, 02:13 PM
Is there a way to save the playcount and album art information? I will be moving my library to a Mac - and the rating fix is great but what about playcounts - also where the heck is album art stored? I really don't want to have to redo all of my album art for my music on my new PowerBook. Thanks for any insight.
ChaoS24
12-24-2005, 12:40 AM
^^^ i would like to know how to save the stuff also....
chippe01
12-26-2005, 04:29 AM
Originally posted by mongoos150
Is there a way to save the playcount and album art information? I will be moving my library to a Mac - and the rating fix is great but what about playcounts - also where the heck is album art stored? I really don't want to have to redo all of my album art for my music on my new PowerBook. Thanks for any insight.
The album art is stored in the tag data. As for the play counts, you could probably do something similar using another of the unused fields by putting the play count number in that field. This would be more difficult, though, as the play count could be any number.
However, if you always keep a back of of the itunes music library files (iTunes Music Library.xml and iTunes Library.itl) you will have backups of ALL the library data - playlists, play counts, ratings, last played and whatever else.
This is great in case you need to reinstall or something happens to the library. Of course, all the music files will need to be in the same place, and it only works for keeping the data within iTunes.
Still a good idea, though.
shapes
03-25-2006, 08:12 PM
Excuse the daft question but can you explain how I write to the grouping as you mentioned in your post.
I've spent many hours categorising and rating my music and I've had to change drives. The idea of manually updating my rating is frightening.
Much appreciate your help
Shapes
chippe01
03-25-2006, 11:19 PM
Originally posted by shapes
Excuse the daft question but can you explain how I write to the grouping as you mentioned in your post.
I've spent many hours categorising and rating my music and I've had to change drives. The idea of manually updating my rating is frightening.
Much appreciate your help
Shapes
You would write to the Grouping category the same way you would change any of the tag data for a file. Right click on a file and choose "Get Info" and go to the INFO tab. The Grouping fiels is right there.
Of course, you can tag multiple files at once by selecting all the files you want with either shift or Control/Click combinations and right-clicking.
LogicalParadox
07-07-2009, 06:44 PM
This is indeed a good idea, but I know a much better way of doing it. The grouping field has an intended and many people use this field for many additional things (I've read of people using it as a way to organize subgenres, for example). But, I I've thought about this and similar ideas for quite some time now, but never gotten around to implementing any of them due to the vastness of my music library (12,000+ music items, not counting audiobooks, playlists, movies, etc).
Use the COMMENTS field instead. The comments field is not only saved to the file itself, it's part of the MP3 ID3 tag, which is supported natively in Windows Explorer (and I'm pretty sure in Mac as well). In other words, you can right click a file, go to 'properties', click the 'summary' button, click the 'advanced button', and see exactly what's in the field from Windows explorer. I do not believe the grouping field is visible this way.
This is the part where if this were an infomercial I would say "BUT WAIT! There's MORE!" As far as I know, the comments field has no limit to how much text can be entered (to be fair, I'm not sure if the grouping field has a limit, either). But one thing is certain: iTunes gives you a nice, big, multi-line text box for inputting and editing the comments field. This lends itself to storing multiple data "tags" and markers of whatever kind. For example, I use the comments field all the time to make notations of artist affiliations. I'm a hiphop fan myself, and as any hiphop fan is aware, there are "supergroups" such as the Wu-Tang Clan that have many affiliated pseudo-members or honorary members, and the individual true members themselves often have solo projects and collaborations. So, what I do is simple make notes of this in the comments field, and then make smart playlists of, say, ALL tracks by or featuring Wu-Tang (or whoever) artists. Similarly, with Deathrow, Badboy, or the various people now affiliated with Eminem. This also works well for aliases. You can use this technique to add more than one genre to a song, or to be very specific with subgenres (which can be a tricky thing with crossover acts or eclectic albums that don't fit well in any single genre). You can add moods, such as 'up beat', 'party', 'sad', 'happy', etc to give you another dimension by which to organize and browse your music, or you can invent thematic pseudo-genres, such as "power ballad", "love songs", or "political", without having to tamper with and mess up your genre schemes. Using such techniques you easily pull create a smart playlist of all your love songs whether they happen to be R&B, Rock, Pop, or even (*cringe*) Country.
So, you could have in your comments section various lines for various custom tags and stored variables that would store MULTIPLE pieces of information either to "backup" iTunes variables, or for your own custom use with smart playlists. It might look something like:
RATING="5"
PLAYCOUNT="2"
THEME="Political"
AFFILIATES="Wu-Tang; Def Squad"
MOOD="xyz"
I, for one, wish Apple would give users some more control directly over what attributes and categories iTunes and the iPod can store and use to organize your music and just how it does so, but for not there seem to be only indirect ways. This is what I do, as I mentioned, to store certain attributes that iTunes does not natively support. And it could easily accommodate your ideas as well. The only bad thing about using the comments section is that I'm not sure how it works when you select multiple files with different comment data and try to edit them all (does it overwrite each individual file's comments section, or does it tack it on to the end?). I suspect this would be the same for the grouping field, however, if one tried to store multiple pieces of data here. It would be impractical to do this by hand anyway, which is why I reserve it solely for other simple purposes.
If someone wanted to make a script, or a simple applet, it could easily store ALL relevant iTunes attributes to the comments section for permanent recall and easily restore them. The script would simply look at a file's playcount or rating, and then write to the comments section "PLAYCOUNT='<value>', <BREAK> RATING='<value>'" etc. It would, of course, have to first check to see if a previous tag value were present and if so then replace it (you could add in a prompt or a check box to skip files with existing values). You then have a script that essentially does the same thing in reverse--just as pedx1ng did, only expanded a bit to give some wider options and included more attributes. Such an applet or script (ideally, some kind of iTunes add-on) could be even more sophisticated if it was made by someone with enough know-how and effort; for example, it could provide a simple interface for a user to create their own custom categories (such as "ALIAS" or "AFFILIATE" or "MOOD", etc) and then view, edit, and update such attributes for multiple files at the same time without any worries or concerns of doing this manually in iTunes as it is now.
Moreover, some brilliant person might know a way to hack the iPod in such a way that a user could select one or more of these custom attributes and make them appear ON THE iPOD for browsing just like artist, album, genre, composer, and audiobook do now. It would be very nice to not have to fumble with a whole bunch of smart playlists, and it would be nice to have the added functionality that this would allow for (if you open a playlist in iTunes, you get a list of songs; if you go to genre, you can then refine your browsing by a specific artist and album, which is obviously could be useful if you're browsing your huge music collection on the go).
So, my advice: use the comments section, and be inventive, and, if any of your happen to be, or know, any very smart programmers, put something together for those of us who neither have the technical knowledge nor the time.
(a short additional rant... I just need to vent): I know that my current situation is that I'm fed up with iTunes and iPod's organization scheme and its limitations. My music gets lost under the sheer mass of its own scale. iPod offers no option to browse by ALBUM ARTIST, only artist, and since so many of my artist fields contain more than one artist (Artist A, Featuring Artists B and C), it is impossible to browse my library on my iPod. I select an artist and many songs are missing because the artist field entries are different. I try to find a song by someone and can't find it because the backup singer or guest artist is listed in the artist field (and I like having that information) and iPod counts this as a unique artist! I have to either browse by Album (and the nice thing about digital music is I no longer should, in principle, have to worry about albums!) or search for it (which is not easy since I have a classic, not a touch, and entering text is a pain). The "Sort by" field, I hoped, would fix this. But it seems like it does not. So, if anyone has a suggestion or knows of a fix or workaround here that is not meticulous and time consuming (such as editing my 12,000 files by hand) please share :-)
Good luck, guys.