Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how do I manually edit Play Count?

I have recently purchased some "remastered" versions of albums I already owned and have been listening to for years. Since I have listened to them for years, I would like to "transfer" the play counts of the original songs to their remastered versions. Therefore, I would like to manually edit the play count of some of songs in iTunes. How do I do this? It is clear after a couple of attempts that manually editing the iTunes Music Library.xml file doesn't do it. The data must be stored in the "iTunes Library" file, but I don't know how to edit it. How can I manually edit play counts?

Any tips would be greatly appreciated.

Thank you.

Regards,
Gary

2.16 GHz MacBook Pro, Mac OS X (10.4.8), 2GB RAM, 7200 RPM HD

Posted on Oct 14, 2006 6:03 PM

Reply
Question marked as Best reply

Posted on Oct 14, 2006 6:11 PM

The only way I know of is to edit the XML file iTunes generates. In the iTunes Music folder is a file called "iTunes Music Library.xml". It lists each and every song, its tags, play count, etc. You could manually edit this for each song.

If you choose to do so, becareful not to change the format of the file or anything.
9 replies
Question marked as Best reply

Oct 14, 2006 6:11 PM in response to G. L. Gray

The only way I know of is to edit the XML file iTunes generates. In the iTunes Music folder is a file called "iTunes Music Library.xml". It lists each and every song, its tags, play count, etc. You could manually edit this for each song.

If you choose to do so, becareful not to change the format of the file or anything.

Oct 14, 2006 6:26 PM in response to Chuck Konfrst

I tried editing "iTunes Music Library.xml". Here is what I did:

(1) Quit iTunes.

(2) Open "iTunes Music Library.xml" in BBEdit.

(3) Search for the song name of interest.

(4) Change the number in:

<key>Play Count</key><integer>84</integer>

to the desired number.

Every time I did this, iTunes would reset the number back to its original value after it is launched.

Am I doing something wrong?

Regards,
Gary

Oct 14, 2006 6:30 PM in response to G. L. Gray

How can I
manually edit play counts?

Any tips would be greatly appreciated.


You can use AppleScript. I whipped up a quick one that will do what you want. Just copy this text and paste it into the Script Editor in the AppleScript folder in your Applications folder:

<pre class="command">tell application "iTunes"
set sel to selection
repeat with t in sel
set trackname to the name of t
set dialog_answers to display dialog "Enter a new play count for " & trackname & ":" default answer ""
set newcount to text returned of dialog_answers as integer
if button returned of dialog_answers is "OK" then
set played count of t to newcount
end if
end repeat
end tell</pre>Look in the Library folder in your account's home. There might be an iTunes folder. If there is, see if there's a "Scripts" folder inside it. If there is, save your script there, with a name like "Change Play Count". Choose "script" as the format. It'll show up in a new menu with a little script icon.

You should be able to select a track or tracks in iTunes and use this script to change the play counts. It's kind of a quick hack, so there's not much in the way of error checking, and if you hit the "Cancel" button, it just stops, but it'll get you started...

charlie

Oct 14, 2006 6:44 PM in response to Chuck Konfrst

I thought for sure that would work - but I just tried
it and it doesn't. Don't know why.


I seem to remember reading, and a quick Google search kind of confirms, that the XML file is re-written by iTunes when it closes, using the information from the other binary database file.

Also, there's this procedure listed in Apple's support site that tells how to use the XML file to recreate your iTunes library. You might be able to use that procedure to get around iTunes re-writing the XML file. Just make sure you've backed up your other preferences, in case it doesn't work. (I didn't feel brave enough to try it).

charlie

Jan 7, 2007 1:51 AM in response to G. L. Gray

Being on Windows and not having the luxury of scripts

In your particular case I do the following.

1) I move the original/old files to a different location on the Hard Drive.
2) Next I run Itunes and try to play those original files, but (obviously:) they're not there and itunes tells me that the source files cannot be found do I want to locate them..
3) It's at this point that I point Itunes to the new remastered version on the HDD and the play count/rating etc is the same just links to the better version..

Hope that helps..

PS - I'm still on the look out for a way to manually or auto update the Play Count (without syncing everything else)

PC

how do I manually edit Play Count?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.