iPlaylist Importer 1.6 - Updated 25/05/2008

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Wed Jan 23, 2008 4:12 am

I don't have iTunes so I've based this script entirely on XML files sent to me by others. I think you have to export the playlists themselves if you want them to appear, not the whole library as that presents itself in the XML as one big playlist.

I have had reports that the ampersand still isn't working, but apostrophes should.

That error means that there's something seriously wrong with the SQL statement, which in itself is fairly simple so it means there must be something strange in the path. Can you please tell me the full value of Songs.SongPath (starting ":MP3\Rock-Pop")?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

cut-copy-paste
Posts: 58
Joined: Wed Jan 16, 2008 9:40 pm
Location: Canada
Contact:

Post by cut-copy-paste » Wed Jan 23, 2008 8:09 am

it's "F:\Mp3\Rock-Pop\Pop\Fun Lovin' Criminals\Fun Lovin' Criminals - 100% Colombian\09-Fun_lovin'_criminals-We_are_all_very_worried_about_you.mp3"

I'd have to guess it's probably the apostrophes in there..?

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Wed Jan 23, 2008 11:48 am

Actually I think it's more likely to be the % which is causing the error.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

cut-copy-paste
Posts: 58
Joined: Wed Jan 16, 2008 9:40 pm
Location: Canada
Contact:

Post by cut-copy-paste » Wed Jan 23, 2008 12:21 pm

ahah.. yeah that makes more sense

have you seen this? it does what I described and got through my %s without trouble.. just only gets 'em into m3u files

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Wed Jan 23, 2008 3:48 pm

New version (1.4) is now available to download from my website. I've now fixed ampersand and percent characters not decoded properly.

@cut-copy-paste - I've not seen this before, but as I don't know C# I didn't really know what I was looking at when I did see it! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Post by Onweerwolf » Sun Jan 27, 2008 12:11 pm

Finally had time to check the latest version of this one and it works perfectly now.

Again, thanx so much for making this Trixmoto!
Image

hkay1
Posts: 8
Joined: Thu Feb 21, 2008 11:32 am

Post by hkay1 » Fri Feb 22, 2008 8:18 am

Cool script. Is there any way to import all your playlists at once without importing the library? I had created my MM library by Adding Tracks through MM and when I ran your script on the exported iTunes library to add my playlists it added the whole library and the playlists too. Now I have two copies of everything. :cry:

Do I need to delete my how library and start all over or can I do a search for the new duplicate tracks that it found from my itunes library now without deleting the playlists?

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Fri Feb 22, 2008 11:27 am

It shouldn't create any new files if the filepaths are the same. If you take one example of two duplicate tracks, what are the two filepaths?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

hkay1
Posts: 8
Joined: Thu Feb 21, 2008 11:32 am

Post by hkay1 » Fri Feb 22, 2008 12:14 pm

you hit the problem on the head. The paths are not the same. I created my media monkey music directory in a different part of my harddrive.

What I think I have to do is somehow edit the paths on the playlist to the new directory. I recreated a bunch of the playlists from scratch but some were painstakingly created a song at a time to suit my mix mood, and I would like to be able to recreate the song list but point it to the other path.

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Post by Onweerwolf » Sun Feb 24, 2008 9:57 am

hkay1 wrote:you hit the problem on the head. The paths are not the same. I created my media monkey music directory in a different part of my harddrive.

What I think I have to do is somehow edit the paths on the playlist to the new directory. I recreated a bunch of the playlists from scratch but some were painstakingly created a song at a time to suit my mix mood, and I would like to be able to recreate the song list but point it to the other path.
You can export a playlist as a .txt file from iTunes and open this with Excel. In Excel you can delete the first row and every column except for the one that has the paths. Now if your paths have all changed in a similar manner (like for instance: C:\Music Folder\artist - song.mp3 -> C:\New Music Folder\artist - song.mp3) you can apply some formula to the path in cell A1 to recreate the new path in another cell. Then copy this formula for all the other paths and save the new column of paths in a new excel file in column A. (Make sure you save the content, not the formula's) Finally save this file as a (unicode) .txt file and chance the .txt extension to .m3u. Then you can import this .m3u file in MM and your playlist should appear under 'imported m3u playlists'

It sounds difficult but once you know how to do it it's very easy and you'll be able to copy all of your playlists from iTunes to MM in no time.

If you have trouble with this feel free to ask me for help.
Image

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Post by Onweerwolf » Sun Feb 24, 2008 10:01 am

@Trix: it's not really a problem but the only thing that still doesn't work smoothly in this script is when the name of a playlist contains a '&'

In such cases the tracks will be imported without problems but the name of the playlist will be screwed up in MM.

You can obviously just rename the playlist in MM, but I though I'd let you know anyway. :)
Image

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Sun Feb 24, 2008 10:41 am

What do you mean be "screwed up"? Can you tell me what the playlist appears as in MM and what the xml file has the playlist name as?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Post by Onweerwolf » Sun Feb 24, 2008 10:58 am

trixmoto wrote:What do you mean be "screwed up"? Can you tell me what the playlist appears as in MM and what the xml file has the playlist name as?
Ah, I thought you understood. It changes '&' to '& # 38 ;' (without spaces) in the name of the playlist, just like it did with tracks before you fixed that.
Image

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Sun Feb 24, 2008 11:10 am

You could fix this by replacing line 121...

Code: Select all

Dim nam : nam = gettag(str,"string")
...with...

Code: Select all

Dim nam : nam = gettag2(str)
That should then run through the previous fix which I did. :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Onweerwolf
Posts: 642
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Post by Onweerwolf » Sun Feb 24, 2008 11:19 am

trixmoto wrote:You could fix this by replacing line 121...

Code: Select all

Dim nam : nam = gettag(str,"string")
...with...

Code: Select all

Dim nam : nam = gettag2(str)
That should then run through the previous fix which I did. :)
Thnx, i'll try that! :D
Image

Post Reply