Programmers - change iTunes .xml based on Traktor Collection .xml???

Programmers - change iTunes .xml based on Traktor Collection .xml???

So I’ve noticed that Play Count in iTunes doesn’t get updated when I play tracks in Traktor.

Obviously.

But, is there a way that we can update the iTunes Library xml, based on the Traktor Collection xml?

I’m guessing this could be done in an Excel spreadsheet that does a vlookup on imported iTunes/Traktor xml’s held in separate worksheets in tle xls workbook?

I assume the .mp3 filename is the same in both the iTunes/traktor xml, so, could you copy the Play Count field from Traktors xml to the Play Count field in the iTunes xml?

You’d need to run the vlookup/macro in the spreadsheet regularly in order to have your iTunes Play Counts reflect the actual plays in traktor - but even if you only ran it once a week/once a month, at least then you’d have data to work with in Smart playlists based on Play Count value…

Feasible? :confused:

Using excel 2010, I can get the traktor collection.nml to open in excel, and it displays the filepath/name and the playcount, so we could easily read from that.

I cannot get the itunes library.xml to open in excel at all though…

Well that sucks… Can you change the itunes library xml to .txt and open it as text (tab delimited) (?) in excel?

It opens, but not all of it is displayed, gave me a ‘file not fully opened’ error on opening (I have over 18000 files in my library).

Also, I can’t find any reference to play count anywhere in it, just the info below:

Track ID20527
NameDance Dance Dance
ArtistChic
Album100 Hits 70s
KindMPEG audio file
Size5286039
Total Time219924
Track Number2
BPM123
Date Modified2014-07-05T12:57:21Z
Date Added2012-06-09T08:48:55Z
Bit Rate192
Sample Rate44100
CommentsFm - 4A
Persistent ID2BEC93A89A988DD6
Track TypeFile
Locationfile://localhost/C:/Users/Rob/Music/Audio Tracks/Albums/100 70’s Hits/CD1/02) Chic - Dance Dance Dance.mp3
File Folder Count5
Library Folder Count1

Hmmm… Interesting…

Looks like it SHOULD look like this:

Play Count1337

Have you ever played that track in iTunes? I imagine there will be no Play Count if the playcount is 0. TBH, none of my tunes get played in iTunes, only Traktor (hence this thread).

Got the above info from this site - some interesting information on iTunes xmls:

Good spot. Looks like I had never played that track in iTunes. Did a search for Play and came across one that had been played:

Track ID25659
NameAmazed
ArtistLonestar
AlbumAmerican Anthems By BSBT RG
Genrepop / rock
KindMPEG audio file
Size9659303
Total Time241057
Track Number17
Year2010
BPM140
Date Modified2014-07-05T12:42:07Z
Date Added2012-06-09T08:50:15Z
Bit Rate320
Sample Rate44100
CommentsAb - 4B
Play Count1
Play Date3489210276
Play Date UTC2014-07-26T08:04:36Z
Persistent ID5313C54258090DE4
Track TypeFile
Locationfile://localhost/C:/Users/Rob/Music/Audio%20Tracks/Albums/American%20Anthems/CD1/17.%20Lonestar%20-%20Amazed.mp3
File Folder Count5
Library Folder Count1

So yes, theoretically you could do some fancy excel stuff to update the playcount from the traktor collection to the iTunes library file. Excel is not my strong point though, so I’m probably not going to be much help…

It can be done but Traktor displays the path differently so you’d have to do some fancy excel programming.

It has <LOCATION DIR=“/:folder/:folder/:” some other suff & then VOLUME=“C:”> or whatever in the same tag.

I don’t know anything about excel but it would be easy enough to do in just about any other language that can parse xml.

We’re making good progress here, fellas! I’m terrible with software, so hopefully someone will chime in with some good ideas…

We just need to find SOMETHING in each xml that is labelled the same for the vlookup to work…

I imagine you could do this with vba. You’d have to read one of the location strings from one of the files into the code, format it to match the string in the other file, then do a search on that file to find a match. Would be slow as hell looping through each row though…

Anybody wanna take a look at this?

I’d LOVE to have a Smart Playlist in iTunes called “Never Played in Traktor”!!!

FUCKIN’ BUMP!!!

I’ve made some REALLY GOOD progress with this - I just need to bounce some ideas off some people here with knowledge of programming…