AF-1 / lms-dynamicplaylists

Dynamic Playlists - a plugin for Lyrion Music Server that lets you use smart playlists (dynamic playlists) to play continuous music mixes based on your selection criteria.
GNU General Public License v3.0
17 stars 3 forks source link

Start/Restart Custom Dynamic Playlist via http request #10

Closed the-other-martin closed 1 year ago

the-other-martin commented 1 year ago

I'm using the following http request to start one of my Custom Dynamic Playlists "03 Lieblingstitel": http://IP:9000/plugins/DynamicPlaylists4/dynamicplaylist_list.html?p0=dynamicplaylist&p1=playlist&p2=play&p3=dplusercustom_03%20lieblingstitel_new&player=xxxxxxxxxxxxxxxx

When I use this request the first time, the DPL starts playing as expected.

When the DPL is paused or player is switched off (same DPL is still selected) and same http request is sent, nothing happens. I would have expected to start the Custom Dynamic Playlist again (or at least continue to play same DPL).

background: I'd like to start DPL via simple iPhone Automation for scanning NFC tag and send http request (which works for the initial scan, but doesn't work for further scans)

Could you please have a look on this issue, Martin

AF-1 commented 1 year ago

If you use dynamicplaylist playlist play for the same dynamic playlist on the same player, DPL will do nothing because as far as it is concerned this dynamic playlist is already active. In this case active means that DPL knows there's a dynamic playlist it should use to retrieve tracks for this player, if necessary.

I see 2 options:

the-other-martin commented 1 year ago

Thanks for the super fast response!

I just have checked the standard behaviour of playlists with one example to play all "BTS" tracks: http://IP:9000/status.html?p0=playlist&p1=loadalbum&p2=*&p3=BTS&p4=*&player=xxxxxxxxxxxx

If this http request is sent again, the playlist is retrieved and started again. Wouldn't it make sense to have same behaviour with DPLs?

AF-1 commented 1 year ago

So you want the dynamicplaylist playlist play command to clear the client playlist first and restart the same dynamic playlist (discarding all information about which tracks of this playlist have been played so far) and NOT resume playback / continue the current dynamic playlist?

I'll take a closer look.

the-other-martin commented 1 year ago

Yes, exactly as the LMS standard playlist behaviour. Thanks for your perfect support!

AF-1 commented 1 year ago

Version 4.1.2 should allow you to use the play command to restart the currently active dynamic playlist. Please confirm before closing. Thank you.

the-other-martin commented 1 year ago

great, works perfectly fine! many thanks!