Updating iTunes Playcount

From Zanecorpwiki

Jump to: navigation, search

Why? Because the iPhone sync is very broken. Worked for a long time, but now somethings happened and it now tends to ignore updates from the phone (like play count). This means that I have lots of old pod casts that I have to manually clear off. Huge pain.

This technique is for windows because A) I had to get a windows box set up for testing browser issues and B) my Mac died. So don't want to, but I do use iTunes on Windows (when will they release a Linux version?)

Copy the following script to notepad and save as 'EditPlayCount.vbs'. While playing the songs in iTunes, click on the script and enter the new play count. Don't play the song from the phone (through iTunes). In my case, this caused iTunes to update the phone with it's playcount (zero).

Dim iTunesApp, currTrack, newPlayCount
Dim prompt, title, defaultValue

Set iTunesApp = WScript.CreateObject(iTunes.Application)
Set currTrack = iTunesApp.CurrentTrack

prompt = New playcount:
title = currTrack.Artist   -   currTrack.Name
defaultValue = currTrack.PlayedCount

newPlayCount = InputBox (prompt, title, defaultValue)

If IsNumeric(newPlayCount) Then
	If newPlayCount = 0 Then 
		If Len(newPlayCount)  0 Then
			currTrack.PlayedCount = newPlayCount
		End If
	End If
End If

This script was developed by Tiketti on iLounge.

Ed. Note: if you google around, you'll find references to updating the iTunes XML file. This may have worked at one time or may work on Mac, but on iTunes 7+ on Windows at least the XML file isn't the real database, it just looks like it. When you start iTunes, it'll pull data from it's secret hidey hole and overwrite all your changes. You'll also find references to playing the last five seconds of the song. This used to work for me, but no longer does. All part of Apples belief that they are smarter than you.

Personal tools