Another iTunes Rant
10-30-2017, 08:44 AM, (This post was last modified: 10-30-2017, 09:11 AM by Gippy.)
Post: #1
Another iTunes Rant
Upon getting a new phone I realized by the persistent nagging to authorize tracks that I had some music that wasn't purchased by me. Some tracks that were shared by one means or another.

Ok, no problem, I'll just nuke 'em and if I really want to keep 'em I'll just go an purchase them. Easy.

No. Not so easy: iTunes doesn't let you sort by purchaser/owner.

Shakefist

I had to write a fucking python script that parses our purchased tracks from my library file and then inspect each physical file to see who the owner was. Sure, sounds fine on the surface, but not all tracks are equal and it appears to be legit for iTunes tracks to not list an owner but still have some kind of internal reference to who the owner is. I get the feeling that it looks them up based on the file's batch or invoice number or something. Its not in the file. Its not in the library.

On top of that neither the "Protected AAC audio file" kind nor the Protected flag seem to be completely accurate to indicate that it requires authorization. I've been prompted for passwords on files that are neither.

There are also owner names for tracks that get downloaded for free... so having an owner name doesn't indicate that authorization is required.

But, I'm 99.9% the way there. I can deal with what I know and handle any other stragglers if they pop up. At a cursory glance it looks like everything that I couldn't determine an owner for are mine. So...

Nuke
10-30-2017, 10:06 AM, (This post was last modified: 10-30-2017, 10:12 AM by roo.)
Post: #2
RE: Another iTunes Rant
Well, you didn't have to write a python file. But you did. And before I go on, let me just agree that iTunes sucks.

On newer files, like U2's free album in 2014, I see a plist section in there that is easy too hook into and says a bunch of stuff. The bit that immediately precedes the plist data on newer files (don't mind the hexes, tis the season for a good hex):

Code:
----meancom.apple.iTunesnameiTunSMPB?data 00006d 000061 00006c 00006c 00006f 000077 000061 00006e 000079 000020 000074 00006f 000075 000063 000068 000065 000073 000020 00006b 000069 000064 000073?----meancom.apple.iTunesnameiTunNORMjdata 00006d 000061 000074 000074 000079 000020 000077 000061 000074 000073 000020 000061 000020 000070 000065 000061 000063 000068 (?nam dataSong for Someone?ARTdataU2aARTdataU2*?alb"dataSongs of Innocencegnredata trkndata diskdatacpildatapgapdata,?day$data2014-09-09T07:00:00Z,apID$datakidtoucher@mattiewantstoeatapeach.com(ownr dataHotForTeensacprtYdata℗ 2014 Island Records, a division of Universal Music Operations LimitedcnIDdata6??rtngdataatIDdata2? plIDdata6???geIDdatasfIDdata0Qstikdata+purd#data2014-09-10 00:31:183xid +dataumgglobal:isrc:GBUM92304723?----meancom.apple.iTunesnameiTunMOVIUdata

The licensee of the file is there.  


But when I look at file I bought in 2011, I see no plist embedded in the file.  That sucks. I see data like this on a track bought in 2011:

Code:
userB{
certXrighveID?platavertran?H9?song
M??too???=?Z??'??,nameWanna Eatapeach?chtb<???64Z?Y,?3?/G??o?_

I guess userB might be worth a search, but parsing doesn't look fun.

So yeah.  I'd think that either ℗ or userB would get you started, but if you're 99% of the way there, screw it, finish it the hard way and call it done.
bedstuy Wrote:mocking a pair of $500 jeans is a form of class warfare... why do you hate my social status?
10-30-2017, 03:57 PM, (This post was last modified: 10-30-2017, 04:01 PM by Gippy.)
Post: #3
RE: Another iTunes Rant
I don’t get what you’re on about.
1. Parse xml for all entries of type AAC, Purchased or Protected
2. Use library to load metadata for each interesting file
3. Export data to csv and do some filtering

Guessing about byte positions and shit is for chumps. Someone else figured that out for me. I do have gripes about some files not having all the data, but this seems to have caught all my invaders. The files that are missing metadata don’t have anything interesting when digging through the raw file data. None of the extra fields that I pulled out maintained any consistency over time. Nothing that would point to a user. They all were newer files, I think, so it felt safe to write them off as OK.

It’s all good. It worked out rather well.
The chaos army seems suspiciously well organized.
flickr | Stupid Blog | Twitter
10-31-2017, 01:04 AM,
Post: #4
RE: Another iTunes Rant
Mostly it was Python to use the Mutagen library to parse the actual music files that house the owner data. Sniffing byte offsets and/or regexing out the data would suck. I would have written it in anything that would have made my life easier (except maybe Ruby or Applescript ;) )
The chaos army seems suspiciously well organized.
flickr | Stupid Blog | Twitter


Forum Jump: