How to save your ratings (permanently)

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

shahed_ameer

New member
Joined
Nov 8, 2003
Messages
15
Points
0
Location
Sacramento, CA
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

New member
Joined
Nov 8, 2003
Messages
15
Points
0
Location
Sacramento, CA
How to restore your ratings

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.
 
Joined
Jul 26, 2003
Messages
2,893
Points
0
FYI, the Grouping Tag maps to the "Content group description" ID3 frame, should you ever need to find it in another program. :D
 

pedx1ng

New member
Joined
Jun 13, 2004
Messages
79
Points
0
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:
Code:
/* 
    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 ([email protected])
*/ 


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:
Code:
/* 
    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 ([email protected])
*/ 


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

New member
Joined
Jun 13, 2004
Messages
79
Points
0
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

New member
Joined
May 10, 2003
Messages
1,052
Points
0
Location
Tucson AZ, USA
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.
 

chippe01

New member
Joined
Jan 28, 2005
Messages
203
Points
0
Age
55
Location
Brooklyn, NY USA
mongoos150 said:
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

New member
Joined
Mar 26, 2006
Messages
1
Points
0
Location
Cork, Ireland
novice

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

New member
Joined
Jan 28, 2005
Messages
203
Points
0
Age
55
Location
Brooklyn, NY USA
Re: novice

shapes said:
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

New member
Joined
Jul 8, 2009
Messages
1
Points
0
A Better Way

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.
 

ITunesBoss

New member
Joined
Jul 22, 2010
Messages
2
Points
0
Location
Richmond Va
Website
www.rasputins-magic.com
How to save Itunes Ratings and restore Itunes music

Posted 7/21/2010

Well Itunes threw us a loop and changed the default location where music is.
:mad::mad:

My #1 Rule, keep music in one place. Thanks Itunes, now I had to re-org.
Where music used to be stored in 'my documents, my music, itunes music' it is now in 'my documents, my music, itunes media, music'

** These instuctions apply if you want to rebuild your Itunes library from a backup. So for example you have a backup of al your music and are applying it to a new computer, or you accidentily deleted music etc, etc.

*** To me, my music is irreplaceable, it took 3 years to get. A external drive is 80$ and 300gb will last you forever. Dont trust the Burn to DVC that Itunes offers, I tried this in the early days, but one bit off and you loose the songs, the drive can't be read etc, etc. Hard drives are the way to go, so much FASTER.

Or like me, you music is in multiple places and you want it all in one place and you want to know how to sucessfully restore your Itunes music.

***

ITUNES 101
-----------------
So ratings and playlists are the #1 things you need to keep. You put much time into them.

Now this assumes you have ratings across songs.

Key: In each of your playlist, give them a common 'Genre" name. This makes organizing easy. Do this by selecting all of your music in the playlist. Then right click, choose 'Get Info' and put a name in the Genre field. It will apply it to all the music. You can do it all in one fell swoop. After a restore you know you have the right music in the right place. Nothing worse than having to rebuild a playlists.

Next, make sure you 'Export' your playlist so you can rebuid them after you redo your music (after a crash etc) Right click on the playlist, choose 'Export' Save all your playlists files in one place easy to find.


Now to save your ratings

1. Create a new playlist called "Top Rated bu"
2. Click on the official 'My Top Rated" and copy all of those songs into the playlist you just created 'Top Rated bu'
3. Export out this playlist

** Recover from a backup ***

Now me, for a complete rebuild of my music, I follow these steps (just did them tonight) My music was in two places now. And as I often attach songs in e-mail, I didn't want to hunt around to find the music. I like all my music in one place. And I let Itunes control it (Go to Edit, Preferences, Advanced tab and check the two boxes to 'Let Itunes Control the music' and "Copy music to Itunes folder'

** Things all Itunes Users should back up ***

So I back up all my songs on an external drive. Copy the whole Itunes Music folder. VERIFY THE MUSIC IS THERE BEFORE PROCEEDING.

Also copy the files under 'Itunes Music' to your external drive
1. Ituneslibraryextras.itdb
2. ItuneslibraryGenius.itdb
3. Ituneslibrary.itl
4. ItunesMusicLibrary.xml
5. Sentinal
(These hold your playlist names etc, but not the music in them)
(It also holds all the artwork)

In Itunes, make a 'Export' of all your playlists
'Right click on the playlist, choose 'Export'

Now you have
1. A copy of your music
2. A copy of Itunes internal files
3. A copy of your playlists (including your Top Rated bu)

VERIFY YOUR BACKUP FILES !!!!


*** Ok, you have crashed, have a new computer etc, etc.
*** To avoid duplicates I follow this procedure ***
It works like a champ, God I love Itunes, it is too cool !!

Clean up any old stuff

Now delete all the music via Itunes. Go to Music, select all and delete.
Go to your 'my documents, my music, itunes, itunes music' and delete all the files there. Go to the Recycle Bin in Windows and empty it.

At this point Itunes is empty of music. (Scarry I know, but trust me it will come back)

Now, Exit Itunes.

Start Itunes again, it is empty but you see your Playlists still there.

1. COPY your music from your External Drive to Itunes:

Copy all your music into Itunes. I simply 'select all' on my external drive's Itunes folder and just click and drag them into the Itunes Window. It is that easy. The music will copy. It takes my 5,600 songs about 50 minutes to copy back into the proper 'my documensts, my music, Itunes, Itunes media, music' folder that Itunes now wants all of us to use.

Go to "File, Library, Import playlist' and go one by one and import your playlists. You will have duplicates playlist names, just delete the empty ones.

Now for your 'Top Rated'

Go to your 'Top Rated bu' playlists. Select all the music and right click and choose 'Get Info' and there is a 'rating' area. Give them 5 stars (you can change later) and apply.

Now if you look in the offical 'My Top Rated' in Itunes you see all your songs there with ratings. They also appear in the indvidual playlists. You can now delete the playlists 'My Top Rated bu'

So now you have
1. All your music in one place
2. All your playists are back
3. Your Ratings are saved.

You may have to authorize a new computer.
4. Choose 'Store, Authorize Computer'
* If you are like me, I had 5 computers already. Go to apple.com and search for 'authorize computer' they have steps if you have authorized all 5 of your possible computers.

Now it is also possible to restore from your IPOD (think a reverse synch) it is a bit messy but it beats loosing your music.

If you want instructions for this email me at
[email protected] and I will walk you through it.

:D Enjoy and Long Live Music :D
 

Reality_King

New member
Joined
Aug 15, 2010
Messages
1
Points
0
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.

Pedx1ng: I have music on my laptop with the ratings and I am trying to export those ratings over to my desktop. I have copied both scripts as you provided above and save with the following extensions as you mention here in my iTunes folder where my song have the ratings.

After the work said completed I then copied those completed scripts over to my desktop which have no ratings and click on them assuming that they would executed a commend to output my ratings! Nothing Happen even after restarting my iTunes.

Could you please provide maybe some details on how to use the scripts to perform the result of getting the ratings to appear on my desktop. Thank you!
 
Top