XSPF Creator 1.1 [MM2+3]

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

Moderators: Peke, Gurus

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

XSPF Creator 1.1 [MM2+3]

Post by trixmoto »

This script, as requested here, creates an XSPF playlist of the selected or visible tracks.

The installer can be downloaded from my website.
Last edited by trixmoto on Wed Oct 31, 2007 11:20 am, edited 2 times in total.
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.
NightInAgharta
Posts: 53
Joined: Mon Jan 17, 2005 6:01 am
Location: ITALY
Contact:

Post by NightInAgharta »

:D :D :D :D THANKS!!! It works great!
But... as I am hard to please, I would appreciate you could do another modifies to your scritp:
i have my music in the foldet c:\musica\<artist>\<album>\<song>
your script correctly create the XSPF using that pathname.
But since I have to move the songs online and use the playlist.xspf in my web site the pathname of course changes to http://<mywebsite>/<path>/<song>
Can you add a prompt where to add the base pathname and use that path for the generated playlist.xspf ? :oops:

GRAZIE!!!!!
We are Microsoft. Every resistance is futile. You will be assimilated. (Bill "Borg" Gates)

See my artists comunity: http://www.artebistro.com
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Is the "http://<mywebsite>/<path>/" part the same for every song? If not, what is the <path> variable - can you give me a couple of examples?
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.
NightInAgharta
Posts: 53
Joined: Mon Jan 17, 2005 6:01 am
Location: ITALY
Contact:

Post by NightInAgharta »

The pathname is the same for every files I select.

Example 1:
I select some files from the folder c:\my music\bauhaus\in the flat field\ and use XSPF creator. It prompts for a base-pathname. I insert http://www.mysite.com/ and it should create the XSPF pathname in this way:
http://www.mysite.com/song1.mp3
http://www.mysite.com/song2.mp3
http://www.mysite.com/song3.mp3
http://www.mysite.com/song4.mp3
...
...
http://www.mysite.com/songx.mp3

Example 2:
I select files from the virtual-folder All files inside c:\my music\bauhaus\ selecting, this way, every files from every albums by Bauhaus. I use then XSPF creator. It prompts for a base-pathname. I insert http://www.mysite.com/ and it should create the XSPF pathname in this way:
http://www.mysite.com/album1/song1.mp3
http://www.mysite.com/album1/song2.mp3
...
...
http://www.mysite.com/album1/songx.mp3

http://www.mysite.com/album2/song1.mp3
http://www.mysite.com/album2/song2.mp3
...
...
http://www.mysite.com/album2/songx.mp3

http://www.mysite.com/album3/song1.mp3
http://www.mysite.com/album3/song2.mp3
...
...
http://www.mysite.com/album3/songx.mp3

and so on for every subfolders inside the main folder.

I hope to have been able to explain.

Thanks for your help.
We are Microsoft. Every resistance is futile. You will be assimilated. (Bill "Borg" Gates)

See my artists comunity: http://www.artebistro.com
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Ok, I'll see what I can do! :)
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.
NightInAgharta
Posts: 53
Joined: Mon Jan 17, 2005 6:01 am
Location: ITALY
Contact:

Post by NightInAgharta »

:wink:
We are Microsoft. Every resistance is futile. You will be assimilated. (Bill "Borg" Gates)

See my artists comunity: http://www.artebistro.com
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (1.1) is now available from my website. Now if all the tracks have a basename in common you are given the option to change 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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

There is now an MM3 installation package for this script available from my website! :)
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.
nobody at the moment

Re: XSPF Creator 1.1 [MM2+3]

Post by nobody at the moment »

If there are backslashes (at least) in the name of the playlist, I get an error with something like "fout" in it.

All I had to do is edit out the backslashes, so not a big deal at all for me. Just an FYI for anyone running into the same problem... maybe other characters can make it croak, too?

Hey, thanks for the great scripts, Trixmoto!
onyxwave
Posts: 22
Joined: Tue Dec 18, 2007 10:59 am

Re: XSPF Creator 1.1 [MM2+3]

Post by onyxwave »

Hello trixmoto:
I know that this is an old thread for an old add-on script you created some time ago. Yet, I'm writing this here in hopes that you could write another XSPF script for me (that may also be helpful for others). If you don't have the time to write it, hopefully you can at least point me in the right directions to begin learning to write it myself (though I'd rather not write it since I know nothing about scripting to MediaMonkey specifications. lol).

My current problem is that when I use MediaMonkey 4.1.5 to create a XSPF playlist from one of my saved AutoPlaylist, it is unable to be played back with the VLC Media Player. After examining a XSPF file created by VLC Player to a XSPF file created by MediaMoney, I noticed a couple things that are most likely the problem.

MediaMonkey stores a file location node like so:
<location>Q:\Video\Television\Z\Z Nation - 2014 - Syfy\Z Nation - 104 - S01E04 - Full Metal Zombie (720p HD 5.1 ch AC-3 HDTV)-DIMENSION.mkv</location>
VLC stores a file location node like so:
<location>file:///Q:/Video/Television/Z/Z%20Nation%20-%202014%20-%20Syfy/Z%20Nation%20-%20104%20-%20S01E04%20-%20Full%20Metal%20Zombie%20(720p%20HD%205.1%20ch%20AC-3%20HDTV)-DIMENSION.mkv</location>

You may notice that MediaMonkey keeps spaces, yet VLC replaces the spaces with "%20". Also, where MediaMonkey stores "\", VLC stores "/". And lastly, at the beginning of the string, where MediaMonkey has "Q:", VLC has "file:///Q:".

So I was hoping you could write a script that creates XSPF files taking these things into account so that it can be played using the VLC player.

Also, a nice extra bonus, would be if you could also add in the capability to add in folders to the file where the folder structure would be based on the media files' field values using the same (or as close as possible) syntax that the MediaMonkey "Auto-Organize files..." function uses.

Let me know if you think this something you'd be interested in tackling, or if this is just a wishful pipe dream of mine that will probably never get fulfilled.

Thanks for taking the time to read this. :)
P.S. If any of you great MediaMonkey scripters/users can assist with this inquiry in any way as well, please feel free to chime in to help a fellow user.
(happy MediaMonkey user since 2001 when it was named Songs-DB)
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: XSPF Creator 1.1 [MM2+3]

Post by trixmoto »

I'm confused, this script allows you to create a XSPF file from a playlist, so what are you asking for that's different than that?
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.
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: XSPF Creator 1.1 [MM2+3]

Post by Peke »

From what I see problem is in Full URLencode for non latin1 characters, Linux Folder separator eg. "/" instead of "\" and VLC add "file:///" prefix so that can parsed to any browser anything else works as it should
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: XSPF Creator 1.1 [MM2+3]

Post by trixmoto »

Yeah, reading it back again, that's actually really obvious from the original post. I must have been really tired when I read it, and not really read it at all.

I've added this to my list, should be easy enough to add in.
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.
Post Reply