Avatar photo

Welcome Guest

Pages: 1
Playlist from DB
LappenPostJanuary 4, 2017, 04:48
Avatar photo
Beginner
Posts: 33
Registered:
November 8, 2014, 11:13
Normal topicPlaylist from DB

Hi,

I have a Yate DB with album and track ids (and a lot of tags o.c.).
I would like to do some kind of smart playlists and generate multiple playlists on a daily basis.

I have played with the DB and DB query actions, but do find it rather complicated.

Can you get me started with an action which generates a playlist based on a query on my DB?
A playlist with all tracks with genre "Techno", released within the last 14 days? I think I will be able to make all of my playlists if you just could help me get started.

Another question - is it possible to run the playlist-generation-action with a command-line command? In that way I can fully automate the generation.

Tia/Lappen

2MR2PostJanuary 4, 2017, 09:18
Avatar photo
Administrator
Posts: 2086
Registered:
August 23, 2012, 19:27
Normal topicRe: Playlist from DB

Hi,

I've updated a quick and dirty sample to:

https://2manyrobots.com/actions/Query-DB-Playlst-Sample.zip

When you unzip it you'll have an action named: Query-DB --> Playlst Sample

I've written it to take the names of required information from named variables. You'll have to change these. I've also included some quick and dirty test code which I used to test the action on one of my databases. With a little editing you should be able to test using this code. The good news is that the actual work is only about eight statements. I've documented the action. The action assumes a database which contains a column containing a file path. If you only have folder paths a little more work will be required.

Note that I've completely ignored the issue of the requirements for an m3u or m3u8 file due to Unicode characters in the filenames. I'm also producing 'absolute' m3u files.

Unfortunately there is no command line interface into Yate. At this point, implementing it would be a lot of work as actions only run if there are loaded files....even if you are not using them, as in this type of action. Also a lot of the code currently assumes that a number of the UI components have been loaded and initialized.

LappenPostJanuary 5, 2017, 05:26
Avatar photo
Beginner
Posts: 33
Registered:
November 8, 2014, 11:13
Normal topicRe: Playlist from DB

Thx for the quick reply. I'll try your quick-and-dirty action out, and get back to you if any problems.
Thanks.
Lappen

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.017 seconds.