Recreate M3U 2.4 - Updated 25/10/2010

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

holterpolter
Posts: 292
Joined: Wed Feb 01, 2006 7:29 am
Location: Germany

Post by holterpolter » Thu May 24, 2007 1:07 pm

Do you think it is much work to add an option to this script to create a playlist from a text file which has the format <Artist> - <Song>.
The Idea behind that is to create a playlist from DJ playlists published in the Web. So you can easily copy the published playlist to a textfile, parse this through your script and get an m3u-playlist.

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

Post by trixmoto » Wed Jun 06, 2007 11:10 am

New version (1.2) is now available to download from my website. Changes include...

- Added "Exit" button to exit out of script completely
- Renamed "Cancel" button to "Skip" for clarity
- Added option to control display of confirmation screen
- Added option to limit the maximum number of tracks on the confirmation screen
- Added possibility to read text files as well

To amend the options you'll need to open the script file in a text editor and follow the stars! :)

@holterpolter - let me know how well this works for you!
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.

holterpolter
Posts: 292
Joined: Wed Feb 01, 2006 7:29 am
Location: Germany

Post by holterpolter » Thu Jun 07, 2007 1:44 pm

Big thanks for the update, and the possibility of reading text files.
I´ve tested it and it seems to work in principle,
although it gives some false positive search results. But i can live with it.
The created m3u-files contains only path-information of the files and no #EXTINF lines.
I don´t know if this is correct in the m3u-specification , but they work on Media Monkey.
So thanks again for the work.
This is really a useful feature that i won´t miss in the future.

SpritHansi
Posts: 57
Joined: Sun Jun 18, 2006 4:43 pm

Post by SpritHansi » Sat Mar 01, 2008 11:07 am

Hi!
Will this script be updated to MM3 soon? :-)

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

Post by trixmoto » Fri Mar 07, 2008 7:30 am

It's on my list! :)
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.

SpritHansi
Posts: 57
Joined: Sun Jun 18, 2006 4:43 pm

Post by SpritHansi » Fri Mar 07, 2008 9:28 am

Nice :-)
Regards
SpritHansi

judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Post by judas » Wed Apr 16, 2008 7:18 pm

This looks like the script I'm needing, do you think it will work? (Need the MM3 version though :-))

http://www.mediamonkey.com/forum/viewtopic.php?t=28398
Cheers, judas

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

Post by trixmoto » Thu Apr 17, 2008 6:57 am

If the filenames in the M3U that you have contain the artist and track details then this script is exactly what you're after. It's not compatible with MM3 yet, but it is on my list.
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.

Guest

MM3 compatibility and extra functionality ???

Post by Guest » Tue Apr 22, 2008 4:34 pm

Hi trixmoto,

This is a very nice script and very usefull for me.
I was able to run it with MM3 by only changing two lines in the script.

First Change (line 214) :

Code: Select all

Dim sql : sql = "SELECT Songs.ID FROM (Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID) INNER JOIN Artists ON Albums.IDArtist = Artists.ID"
in

Code: Select all

Dim sql : sql = "SELECT Songs.ID FROM Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID INNER JOIN Artists ON Albums.Artist = Artists.Artist"
Second Change (line 248) :

Code: Select all

sql = "SELECT Songs.ID FROM (Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID) INNER JOIN Artists ON Albums.IDArtist = Artists.ID"
in

Code: Select all

sql = "SELECT Songs.ID FROM Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID INNER JOIN Artists ON Albums.Artist = Artists.Artist"
I'm not sure if this is correct, but it's working. I found out by using the sqlviewer script !!!

I'd like to ask you if it's possible to add 1 extra feature to the script, since i'm using it now together with your importM3U script to make playlists of the yearly top100 charts which I have in excel.
The songs are numbered (of course) from 1 to 100

The problem I have is not directly in the recreateM3U script since it works perfect. But suppose I have a song more than once in my database f.e.
on a live album, greatest hits album and normal album.
The script will give me the possibility to choose only one of these three versions, so the m3u that will be created has exactly the 100 songs.

But if I use the importM3U script to have the created playlist available in mediamonkey again it will import all the three versions of the example above.

So i'd like to ask you if it's possible that the recreateM3U script not only creates a "fixed" playlist, but also adds the playlist to MM.
Since the choise for only 1 of the three versions (example above) is already made in this script I think it should be possible to add it only once to the playlist.

I hope it's clear to you what I'm asking and I hope it's possible to add this to the script.

Kind regards,
Dreesje

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

Post by trixmoto » Tue Apr 22, 2008 5:37 pm

Thanks for this, that should make my job of updating the script easier! :)

As this script creates an M3U, you could simply scan the folder to import the M3U into MM. I will look into adding it as an option as well though when I update the script.
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.

dreesje
Posts: 3
Joined: Tue Apr 22, 2008 3:47 pm

Post by dreesje » Wed Apr 23, 2008 4:44 am

Thak you trixmoto,

I'm looking forward to this update

Kind regards,
dreesje

dreesje
Posts: 3
Joined: Tue Apr 22, 2008 3:47 pm

Post by dreesje » Thu Apr 24, 2008 5:48 am

Hi Trixmoto

You were right I didn't think of this solution, but it's great.
I now create M3U's with the script in a default directory and afterwards I scan this directory to import the M3U's into MM.

It works great. Thank you for your help

Kind regards,
dreesje

dreesje
Posts: 3
Joined: Tue Apr 22, 2008 3:47 pm

Post by dreesje » Tue Apr 29, 2008 3:11 pm

in my post of april 22 I suggested a small codechange to make the script work for MM3.
I made an improvement to have a better recreation coverage.
Maybe this is useful for somebody else also.

change original code (line 214) :

Code: Select all

Dim sql : sql = "SELECT Songs.ID FROM (Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID) INNER JOIN Artists ON Albums.IDArtist = Artists.ID" 
in

Code: Select all

 Dim sql : sql = "SELECT Songs.ID FROM Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID INNER JOIN ArtistsSongs ON Songs.ID = ArtistsSongs.IDSong INNER JOIN Artists ON ArtistsSongs.IDArtist = Artists.ID" 
Second Change (line 248) :

Code: Select all

sql = "SELECT Songs.ID FROM (Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID) INNER JOIN Artists ON Albums.IDArtist = Artists.ID"
in

Code: Select all

sql = "SELECT Songs.ID FROM Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID INNER JOIN ArtistsSongs ON Songs.ID = ArtistsSongs.IDSong INNER JOIN Artists ON ArtistsSongs.IDArtist = Artists.ID" 
dreesje

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

Post by trixmoto » Tue Apr 29, 2008 4:01 pm

Thanks, this script is still on my list to update so I'm sure this will prove useful.
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.

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Tue Apr 29, 2008 4:53 pm

Not fully understanding what the SQL's are supposed to do exactly but looking at the MM2 syntax they really should be like this to do the same as in MM2:
sql 1:

Code: Select all

Dim sql : sql = "SELECT Songs.ID FROM Songs INNER JOIN ArtistsAlbums ON Songs.IDAlbum = ArtistsAlbums.IDAlbum INNER JOIN Artists ON ArtistsAlbums.IDArtist = Artists.ID"
sql 2:

Code: Select all

Dim sql : sql = "SELECT Songs.ID FROM Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID INNER JOIN ArtistsSongs ON Songs.ID = ArtistsSongs.IDSong INNER JOIN Artists ON ArtistsSongs.IDArtist = Artists.ID WHERE ArtistsSongs.PersonType=1"
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts

Post Reply