Export to iTunes

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Tylast
Posts: 130
Joined: Sun Jan 29, 2006 12:54 pm
Location: US
Contact:

Re: Export to iTunes

Post by Tylast »

Anyone know of a script that exports the entire DB back to the iTunes format? I want to use iTunes & MM, but I don't want to start from scratch with iTunes.
Thanks!
Image
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Tylast
Posts: 130
Joined: Sun Jan 29, 2006 12:54 pm
Location: US
Contact:

Re: Export to iTunes

Post by Tylast »

Thanks, but I've already tried it. Not completely compatible. I've already left my feedback in that thread. Thanks!
Image
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

Have you tried creating a playlist of your entire db and using this one?? But what is incompatible with the other one, I've used that one to export my entire db, the only problem I ran into it is because iTunes do not support unicode characters in the filename and it's inability to update the tracks rather than having to keep adding them to the db and starting from fresh each time.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Tylast
Posts: 130
Joined: Sun Jan 29, 2006 12:54 pm
Location: US
Contact:

Re: Export to iTunes

Post by Tylast »

Actually, the problems I was having were that the ratings, play count, & date added info were there. Let me try a few tweaks this weekend & get back. Thanks for your help! :wink:
Image
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

Please keep me posted, I would like to use the best one possible to keep itunes in sync with MM, my son likes itunes. :-?
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export to iTunes

Post by markstuartwalker »

Those of you who monitor this thread may be interested that I'm planning a new release of this script (recent iPhone/iTunes/MM updates have disturbed things enough to dissatisfy me again and I am now using iTunes 9.0).

The first step is to add playcount retrieval. Once I got down to it this turned out to be pretty straightforward. Here is a cut of my test code which I put together to provide a benchmark.

Code: Select all

Public Class classPlaycounts

    Dim iTunesApp As iTunesLib.iTunesApp
    Dim SDB As SongsDB.SDBApplication

    Sub read()

        SDB = New SongsDB.SDBApplication

        iTunesApp = New iTunesLib.iTunesApp
        Dim tc As iTunesLib.IITTrackCollection
        tc = iTunesApp.LibraryPlaylist.Tracks
        Dim t As iTunesLib.IITTrack

        For Each t In tc
            If t.PlayedCount > 0 Then
                SDB.Database.ExecSQL("UPDATE Songs SET PlayCounter = PlayCounter + " & CStr(t.PlayedCount) & " WHERE( SongTitle = """ & t.Name & """ AND Artist = """ & t.Artist """)")
                t.PlayedCount = 0
            End If
        Next

    End Sub

End Class
Short and sweet isn't it? This retrieves 100 playcounts from an iTunes database hosting 6300 songs in about 15 seconds on a 2.8GHz machine.

The general flow of things is that
  • * MM database holds the master tracks, playlists and playcounts
    * iTunes has playlist and tracks is sent to from MM using Export to iTunes. Prior playcounts are recovered back to the MM database
    * iPhone is synchronised to iTunes DB by the normal Sync mechanisms
iTunes handles the playcount synchronisation to/from the iPhone. Export to iTunes will retrieve the playcounts from iTunes BEFORE sending new tracks to iTunes. Hence playing the track in MM, iTunes and iPhone will maintain a master playcount in MM database.

I'll keep you posted about the upcoming 2.9 release.

Mark
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Export to iTunes

Post by Psyker7 »

Wow, great idea that!
At the moment I use scrobbl on my iPhone to upload to last.fm and then pull them down by sync'ing using my script... this could work better! will have to experiment I guess!
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

markstuartwalker wrote:The first step is to add playcount retrieval. Once I got down to it this turned out to be pretty straightforward. Here is a cut of my test code which I put together to provide a benchmark.
I am excited with anticipation.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export to iTunes

Post by markstuartwalker »

nynaevelan wrote:
markstuartwalker wrote:The first step is to add playcount retrieval. Once I got down to it this turned out to be pretty straightforward. Here is a cut of my test code which I put together to provide a benchmark.
I am excited with anticipation.
Psyker7 wrote:Wow, great idea that!
At the moment I use scrobbl on my iPhone to upload to last.fm and then pull them down by sync'ing using my script... this could work better! will have to experiment I guess!
Any other suggestions for other data to synchronise back?

Ratings? I don't use them myself but others have requested that though I have reservations about handling the situation where ratings get changed ... how do you know which end has changed?
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

Ratings are not critical for me either, I only want playcount and playlists, but playlists are not essential.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Psyker7
Posts: 255
Joined: Sat Mar 03, 2007 8:00 am

Re: Export to iTunes

Post by Psyker7 »

markstuartwalker wrote: Any other suggestions for other data to synchronise back?

Ratings? I don't use them myself but others have requested that though I have reservations about handling the situation where ratings get changed ... how do you know which end has changed?
I use ratings, but they are based off playcounts using autorateaccurate so not a big deal.
Prehaps last played date / time?

I think most other information will be static anyway.
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export to iTunes

Post by markstuartwalker »

Version 2.9 released

Files in the usual place http://www.mediafire.com/?sharekey=b7ee ... 6e282a0ee8

This adds 2 features
1. Option to sync the iPod after the addition/deletion
2. Optional recovery of iTunes playcounts back to the MM database

The playcounts in the iTunes DB are already updated from the iPhone when it is sync'd. This new feature reads those playcounts from the iTunes DB and updates the MM DB. Note that this feature is VERY new so treat with caution. If you have playcounts in the iTunes DB or MM DB that you wish to preserve then please backup your databases before beginning.

I must admit that I'm not happy with the user interface, I can feel a 3.0 version coming on. Any suggestions for improvements are very welcome. My current list is ...

1. Single click to add new playlist(s)
2. Page that shows currently loaded playlists in IiTunes and allows deletion of entries
3. Definition of a large playlist which identifies the superset of tracks that can be loaded into iTunes.

#3 is a practice which I have already manually adopted. By pushing Accessible Tracks into iTunes and then using this extension the update rate is greatly improved (about 2 times). A slow background task to synchronise between iTunes and MM would be added.

Mark
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

You have the option to load the playcounts from iTunes to MM, what about the option to add the playcounts from MM to iTunes?
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export to iTunes

Post by markstuartwalker »

nynaevelan wrote:You have the option to load the playcounts from iTunes to MM, what about the option to add the playcounts from MM to iTunes?
It is illogical to do so. You must choose one end to be the "master". In this case MM is the master as this holds more tracks that iTunes.

Scenario with MM being the master
  • Track is in MM=5
    Track is exported to iTunes: iTunes=0,MM=5
    Track is played in iTunes: iTunes=1,MM=5
    Playcounts are recovered from iTunes: iTunes=0,MM=6
    Total playcount=6
Scenario with MM and iTunes being equal
  • Track is in MM=5
    Track is exported to iTunes: iTunes=5,MM=5
    Track is played in iTunes: iTunes=6,MM=5
    Playcounts are recovered: iTunes=0,MM=11
    Total playcount=11, clearly wrong!
Remember, I only use iTunes to be a staging area on the way to the iPhone so I'm not interested in iTunes Smart Playlists which may make use of playcounts. The iPhone doesn't allow creation of smart playlists.

I apologise if I've misunderstood your requirement. If so, please detail the scenario you'd like to see operate.

Mark
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
Post Reply