INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: iPhone, iTunes & MC  (Read 2917 times)

prod

  • Citizen of the Universe
  • *****
  • Posts: 958
  • Play nice
iPhone, iTunes & MC
« on: April 25, 2009, 08:56:01 am »

My problem must be quite common. I have a desktop computer permanently set up in a living room, connected to an amp with speakers, and with MC installed mostly to play music and photos and look pretty while it's doing it. Great so far. But, I have an iPhone on to which I want a selection of playlists, some of which are based on ratings and play stats. As we all know, this is made difficult because of Apple's closed policy. When I rate a tune in MC I have to also do it in iTunes, and when I rate a tune on my iPhone I have to make sure I remember to do it in MC. As for play stats - no chance. I ONLY use iTunes as a means to put stuff on my iPhone, not to organise or playback my music.

So I thought of a solution... I've written a simple standalone app that merges the XML iTunes Library and the XML exported version of the MC library. You then delete the iTunes ITL database and import the new & merged iTunes Library XML. It actually works and takes about 10 minutes on my machine for a 20MB library. I get my accurate play stats and ratings in iTunes, and therefore the accurate smartlists on my iPhone when I sync. Also, you can export your entire "Music" playlist in iTunes, and the app will change it so that MC will import it and sync all ratings and play stats in your MC library. All I do is import the Music.xml playlist then right click the contents and "Update tags (from library)". You might wonder why the app needs to be involved in that process - the reason is because when a track has no rating or play stat info it doesn't include that information in the XML, so the app simply puts it in there as zero so MC will see it accurately when perhaps I've removed a rating from a song.

Not for the faint hearted I know let me know if you're interested and when I've polished the app up a bit I'll make it available. Also if you have any suggestions I could maybe put them in.

PS: the app doesn't directly modify the iTunes or MC libraries in any way.
Logged

rowens

  • Regular Member
  • Recent member
  • *
  • Posts: 40
  • Change this by choosing profile
Re: iPhone, iTunes & MC
« Reply #1 on: April 25, 2009, 06:31:53 pm »

Wow... this sounds exactly like what i've been googling for!!!!  :)

I'm pretty much in the same situation - forced to use iTunes to sync my Touch, but everything else is MC.  For now, i've been manually inputing Ratings from my Touch into MC... ugh.  For getting MC ratings into iTunes, i've just avoided it.

I'd be curious to know how play counts sync up, though.  Assuming i 'sync' the libraries, then play a song in MC, play that same song on the Touch (and then sync it to iTunes), both playcounts would be +1.  The 'correct' playcount should be +2, though.  Does your app can determine the playcount since last library sync (ie, the net change of +1 to then incremental MC's playcount), to keep them accurate and synced between the two libraries?

Also, if i have a song rated 4 in MC, but 3 in iTunes, how does you app determine which to use when syncing the libraries?  Is there a default whereby either iTunes or MC has priority?  Or maybe i'm missing something...

Sounds cool though, nontheless...

Logged

prod

  • Citizen of the Universe
  • *****
  • Posts: 958
  • Play nice
Re: iPhone, iTunes & MC
« Reply #2 on: April 26, 2009, 04:34:57 am »

At the moment it merely applies the greater value. That is, if iTunes says you've played it 20 times and MC says 18, then the number applied is 20. Tracking changes between syncs would complicate things quite a bit, but it's a good point so I'll give it some thought and see if I can work something in.

The app gives an option to sync the ratings from MC to iTunes or vice versa, so the determination is made by the user in choosing the option.

There's a date modified field I can use so whichever is the greater is determined the most up-to-date.
Logged

rowens

  • Regular Member
  • Recent member
  • *
  • Posts: 40
  • Change this by choosing profile
Re: iPhone, iTunes & MC
« Reply #3 on: April 26, 2009, 10:28:05 am »

Nice...sounds like the date modified field would fit the bill for syncing ratings..

I was thinking through the playcount a little more... personally, i don't need iTunes playcount to be in sync with MC since i really don't use iTunes other than to get media onto Touch.  What if your app had something along the lines of an option for the following logic?  1) read in playcounts from each XML database, 2) take MC's playcount and add to it the playcount from iTunes, 3) for iTunes then, reset the playcount to zero.

As playcounts are updated by the Touch/iPhone in iTunes, it is always incremental playcount and gets added to MC and then reset to 0 on each sync.  So MCs database at least is always accurate..

Seems that might work?

It seems that if one truly wanted to keep playcount accurately sync'd on both MC and iTunes, then maybe a custom database field in MC could be used that would store the playcount from the last database sync, then take the differences from MCs and iTunes' current playcount and aggregate them... would work, but i suspect it is a little more of a complex programming task.

Logged

jack wallstreet

  • Citizen of the Universe
  • *****
  • Posts: 522
Re: iPhone, iTunes & MC
« Reply #4 on: April 26, 2009, 11:03:49 am »

Expansion on this concept - a solution to Apple product lock downs

I was wondering whether this is a relatively low cost approach J River could take to solving the Iphone/Ipod compatability issues for at least the intermediate term.  The Iphones and Ipods have been locked down, but they are accessible through Itunes, so....

Provide an interface hopefully two-way, but at least one-way, to Itunes (as suggested here by Prod or as modified by J River) to allow MC data to be put into Apple products, including playlists, and ideally, to allow interface in the other direction also.

I am wondering if that approach might work for Zune also
Logged
John

prod

  • Citizen of the Universe
  • *****
  • Posts: 958
  • Play nice
Re: iPhone, iTunes & MC
« Reply #5 on: April 27, 2009, 11:13:11 am »

for iTunes then, reset the playcount to zero.

I want an accurate play count in iTunes so I can have smart lists transferred to the iPhone that are based on play stats. If iTunes is always wrong, then I can't do that. Actually, I can, but they're meaningless.

Adding custom database fields won't work as I'm only able to read them from the exported library... MC has no idea that anything has happened so wouldn't know to update any kind of "last sync" field. I'm really just interested in creating XML that can be used by the user to update their respective libraries themselves.

I was wondering whether this is a relatively low cost approach J River could take to solving the Iphone/Ipod compatability issues for at least the intermediate term.  The Iphones and Ipods have been locked down, but they are accessible through Itunes, so....

To have a seamless operation, you'd have to access the binary iTunes database directly ... which would entail the same effort as just accessing the device itself directly, probably.
Logged

prod

  • Citizen of the Universe
  • *****
  • Posts: 958
  • Play nice
Re: iPhone, iTunes & MC
« Reply #6 on: April 28, 2009, 12:35:19 pm »

Provide an interface hopefully two-way, but at least one-way, to Itunes (as suggested here by Prod or as modified by J River) to allow MC data to be put into Apple products, including playlists, and ideally, to allow interface in the other direction also.

I've discovered today that iTunes has a COM interface (as does MC), so I've scrapped what I've been doing and gone in that direction. Looks pretty seamless so far, very close to an ideal solution for me, in that it now alters the iTunes and MC databases directly without any user interaction. Once I'm done I'll post up exactly what the app does.
Logged

steveklein

  • Galactic Citizen
  • ****
  • Posts: 478
Re: iPhone, iTunes & MC
« Reply #7 on: April 28, 2009, 03:05:07 pm »

interesting workaround.

i have the same thing as the OP basically (an iPhone which has to be synced in iTunes, an older iPod which syncs in MC, and most of my listening, which is done in my living room on my desktop)

i too wanted the smartlists to work on my iPhone, and many were based on ratings.

i found this simple solution which does take a few minutes to do, but really wasn't too much of a hassle. (i only update my iPhone library about once every 6 weeks or so).

http://www.cotellese.net/2007/12/05/easily-import-song-ratings-to-itunes/
Logged

prod

  • Citizen of the Universe
  • *****
  • Posts: 958
  • Play nice
Re: iPhone, iTunes & MC
« Reply #8 on: April 28, 2009, 04:02:49 pm »

Yeah I've been doing this for some time, but got sick of it. Plus I sometimes rate songs on my iPhone and syncing them back to MC automatically isn't quite so easy.
Logged

prod

  • Citizen of the Universe
  • *****
  • Posts: 958
  • Play nice
Re: iPhone, iTunes & MC
« Reply #9 on: April 30, 2009, 11:49:53 am »

See this post for the resulting app. Hope you find it useful. Let me know if you've any problems or suggestions.
Logged
Pages: [1]   Go Up