Page 2 of 8

Posted: Thu May 24, 2007 1:07 pm
by holterpolter
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.

Posted: Wed Jun 06, 2007 11:10 am
by trixmoto
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!

Posted: Thu Jun 07, 2007 1:44 pm
by holterpolter
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.

Posted: Sat Mar 01, 2008 11:07 am
by SpritHansi
Hi!
Will this script be updated to MM3 soon? :-)

Posted: Fri Mar 07, 2008 7:30 am
by trixmoto
It's on my list! :)

Posted: Fri Mar 07, 2008 9:28 am
by SpritHansi
Nice :-)

Posted: Wed Apr 16, 2008 7:18 pm
by judas
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

Posted: Thu Apr 17, 2008 6:57 am
by trixmoto
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.

MM3 compatibility and extra functionality ???

Posted: Tue Apr 22, 2008 4:34 pm
by Guest
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

Posted: Tue Apr 22, 2008 5:37 pm
by trixmoto
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.

Posted: Wed Apr 23, 2008 4:44 am
by dreesje
Thak you trixmoto,

I'm looking forward to this update

Kind regards,
dreesje

Posted: Thu Apr 24, 2008 5:48 am
by dreesje
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

Posted: Tue Apr 29, 2008 3:11 pm
by dreesje
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

Posted: Tue Apr 29, 2008 4:01 pm
by trixmoto
Thanks, this script is still on my list to update so I'm sure this will prove useful.

Posted: Tue Apr 29, 2008 4:53 pm
by Bex
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"