cpd73 wrote:
> Yes, you could use a script.
OK I was able to get a test script to work that has two commands in it.
One thing I have noticed is whatever the first variable is, for example
*$ID*, is not passed onto the second command. I had to use *$NAME* in
the second command to get the script to work. For whatever reason if I
use *$ID* more than once it sends that param blank.
BLANK PARAM IN REQUEST PAYLOAD...
Code:
--------------------
{"id":0,"method":"slim.request","params":["",["dynamicplaylist","playlist","stop"]]}
--------------------
THIS WORKS...
Code:
--------------------
{
"title":"Artist Radio",
"script":"lmsCommand('$ID', ['dynamicplaylist', 'playlist', 'play',
'dpldefault_zz_CONTEXTMENU_for_selected_artist_a01_songs_random',
'dynamicplaylist_parameter_1:$ARTISTID']); setTimeout(() => lmsCommand('$NAME',
['dynamicplaylist', 'playlist', 'stop']), 10000)",
"icon":"queue_music"
},
--------------------
THIS DOES NOT WORK...
Code:
--------------------
{
"title":"Artist Radio",
"script":"lmsCommand('$ID', ['dynamicplaylist', 'playlist', 'play',
'dpldefault_zz_CONTEXTMENU_for_selected_artist_a01_songs_random',
'dynamicplaylist_parameter_1:$ARTISTID']); setTimeout(() => lmsCommand('$ID',
['dynamicplaylist', 'playlist', 'stop']), 10000)",
"icon":"queue_music"
},
--------------------
------------------------------------------------------------------------
shinedou's Profile: http://forums.slimdevices.com/member.php?userid=72027
View this thread: http://forums.slimdevices.com/showthread.php?t=109624
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins