Creating an Autoplaylist via script

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Creating an Autoplaylist via script

by MoDementia » Sat Jul 08, 2006 3:14 am

I just spent a little time around Auto and Normal Playlists for my script and this is what I found.

This is from the standard "Favorites - Top 50" Playlist in the table playlists field QueryData.

I looks like the format of an .ini file but there isn't a member for playlist = QueryData i.e. Playlist.QueryData :(

Code: Select all

[Common]
QueryVersion=1
QueryType=2
[Adv]
ConditionsCount=1
OrdersCount=2
LimitTop=1
Top=50
[AdvCond1]
DBField=Songs.PlayCounter
Condition=32
Value=0
[AdvSO1]
Order=Songs.PlayCounter
Asc=0
[AdvSO2]
Order=Songs.LastTimePlayed
Asc=1

by DaledeSilva » Mon Jul 03, 2006 11:13 pm

actually.. it does create alot of playlists.. but not as many as you might think.. and certainly not simply doubling up on an artist node.

the script first goes through and reads everyfile in the database and counts, for each artist, the number of their tracks that are higher than a certain rating (let's say, 4 or 5 stars).

then, if that number is greater than 4 tracks (so the artist has at least 5 songs rated 4 stars or above) then it makes an auto playlist based on that criteria for that artist.

all the playlists are placed inside another playlist call "Artist - Groups" for good tree organisation.

the reason I made this is because I put songs on my ipod automatically by syncing an autoplaylist of 3 stars or higher out of my whole library. but when I'm listeing to my ipod.. sometimes I only want to here the songs I REALLY REALL dig by an artist.. so I have these playlists... but at the moment I've only manually created them for a few artists because I can't be bothered creating them.. but with the script I can create ALL of them in a few seconds. And the script can be adapted to other playlist types as well.

because it seems autoplaylist creation isn't possible (at lease for me)... I will have to create normal playlists (which requires more integrated playlist populating throughout the script - whereas an autoplaylist could simply be created at the end)....
...however, it means that if I then rate some more of any of the same artists... the lists wont automatically update, I will have to run the script again.

I can still make it quite useful.. but obviously autoplaylist creation would be much more useful in so many more circumstances.

Dale.

by Teknojnky » Mon Jul 03, 2006 8:07 pm

Ah, interesting... I hope a solution can be found, sounds like an interesting idea.. sounds like it can lead to alot of playlists tho.

by DaledeSilva » Mon Jul 03, 2006 8:02 pm

Teknojnky,

I'm trying to automate auto playlist creation via scripting...

so I can make a script which has a loop in it and therefore creates a similar autoplaylist for each artist in a list of artists without having to manually create each one.

Dale.

by Teknojnky » Mon Jul 03, 2006 7:58 pm

It's easy to create autoplaylists, but only possible if you have gold... is that your problem is that you don't have gold version?

Or are you trying to accomplish something that is not available via the normal autoplaylist dialogs?

by DaledeSilva » Mon Jul 03, 2006 6:45 pm

I'm afraid dealing directly with the database directly may be a bit over my head... I'll have to rewrite it to just create normal playlists for now and hope that an easier method becomes available in a future version...

is this likely?

thanks for the help.

Dale.

by trixmoto » Mon Jul 03, 2006 10:57 am

The problem I think is that currently the only way I can think of adding one would be to directly write one into the database. But MM won't notice this until it starts up, maybe?

by Lowlander » Mon Jul 03, 2006 9:58 am

I believe the only attempt to do something with auto-playlists was done by TheRocket in http://www.mediamonkey.com/forum/viewtopic.php?p=10777. This only reads the field and calculates which tracks match.

This might help you on your way. I don't know if there are other methods available to create auto-playlists.

Creating an Autoplaylist via script

by DaledeSilva » Mon Jul 03, 2006 9:50 am

hello.. I've created a script to search the database and find all the artists that have more than 3 highly rated tracks.. then it is supposed to create an autoplaylist based on the artists name and tracks rated higher than 3 stars.

The whole thing is created and the playlists get created but I cannot make them "auto" playlists... I mentioned this previously in another thread before creating the script and it was mentioned that it is possible... but I'm thinking that maybe it's not.

any assistance on how to do this would be absolutely great. Or any word on if it is even possible.

Thanks for any comment you might have,

Dale.

Top