Exporting All Playlists By Script

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

Moderators: Peke, Gurus

Tasuki Yamamoto
Posts: 9
Joined: Fri Sep 12, 2003 5:20 pm

Exporting All Playlists By Script

Post by Tasuki Yamamoto »

Hello,

Does anyone know how I could quickly and in one go export all the playlists to files (using "sensible" or interactive rules such as using the name of the playlist as the name of each playlist file)?

I cannot find any objects with IDispatch interfaces that could be asked to produce a list of all the playlists.

Tasuki Yamamoto.
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

Not all MM's features are supported in the scripting interface yet, which is also the case of playlists. We plan to enhance the interfaces in the future versions. If you have anything particular that you think shouldn't be missing, let us know.

Jiri
Guest

Ability to export all playlists to m3u

Post by Guest »

I would just like to cast my vote for the ability to export all playlists to m3u files. Being able to accomplish this in batch would be very helpful.

Also, in customizing the script, I can reference the artist, album, genre, etc. But there is not currently a way to access other fields such as comments, lyrics, playlists, or the custom fields. Am I correct in this? The ability to reference the playlists in a script would be helpful...

Thanks,

Troy
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

We will consider adding new features to the scripting for the new version. I agree that playlist support would be nice.

However, you can even now access all track details that exist in MediaMonkey, check this post http://www.songs-db.com/forum/viewtopic.php?t=426 for list of all scripting objects and their properties.

Jiri
Lowlander
Posts: 56609
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Example

Post by Lowlander »

Or this post with at the end a working HTML export script with nearly all fields: http://www.songs-db.com/forum/viewtopic.php?t=701
jaxjon
Posts: 102
Joined: Tue May 27, 2003 8:47 am
Location: Florida USA

Post by jaxjon »

Question. Would it be possible to create a script to automatically play certain songs at a certain time on a certain day in MMonkey, such as all jazz songs from 7am to 12pm on Sundays? I have been playing with SAM2 and I really like their PAL scripting. It would be nice to be able to use MMonkey in the same way. Thanks

Jon
Peke
Posts: 17489
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

It is More Advanced feature that are mostly req. by radio stations here, but who knows it is defenetly a usefull feature.
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
George V

please...

Post by George V »

So, finally is it possible to export all playlists at once
with the current version or the final 2.2 ?
Using a script ?
Please ....
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

There was an object added (in 2.2) to support working with playlists from scripts, see http://www.songs-db.com/forum/viewtopic.php?p=6512 for scripting reference and there ISDBApplication::PlaylistByTitle for an example on using it. It is:

Code: Select all

Set Playlist = SDB.PlaylistByTitle( "")
Set list = Playlist.ChildPlaylists

For i=0 To list.count-1
  Set itm = list.Item(i)
  fout.WriteLine itm.Title & " (" & CStr(itm.ChildPlaylists.Count) & "/" & CStr( itm.Tracks.Count) & ")"
Next
Jiri
George V

thank you

Post by George V »

Thank you so much, i'll try it.
If anyone else can do a script like this and post it,
this will be very usefull i think.

Thanks again.
FurAnt
Posts: 165
Joined: Thu Jul 17, 2003 3:38 pm
Location: Atlanta, GA

Post by FurAnt »

Jiri,

Thanks. This looks promising. Too bad I'm still ignorant on the scripting. I will try to take some time to work with the playlists over the weekend, but if anyone has taken the initiative to export all of their playlists, please post here.

Also, can you think of any way of identifying duplicate songs within a single playlist? I have seen this requested before for OOTB functionality, but I'm not sure when it will be added.

Any help's appreciated.

Thanks,
Joey
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

The only way I can think of is to go through content of playlist (using Tracks property of playlists), check for duplicate entries (e.g. each track's ID property could be used) and remove those tracks that are duplicate (using RemoveTrack method of Playlist object).

Jiri
Post Reply