Announcement

Collapse
No announcement yet.

Script control

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script control

    I am trying to get a script to generate a list of playlists from a folder on the HS computer and picking a random one to play, which is working fine.

    However, I cannot seem to get the syntax right in VB to tell the plugin how to actually play the selected playlist...

    if fileToPlay <> "" then
    hs.PluginFunction "XBMC", "", "PlayerOpenMedia(CORE, File, " & fileToPlay & "), nothing"
    else
    end if

    the fileToPlay variable is the full path to the playlist m3u file
    CORE is the name of the Kodi player
    I'm guessing that I'm just not using the right syntax there, as HS is not reporting any errors, but Kodi is not playing.

  • #2
    I think there is 2 problems:

    1. your syntax is wrong, the parameters of the PlayerOpenMedia function need to be passed as an array and as the last parameter of the hs.PluginFunction

    2. I just found that the PlayerOpenMedia scripting function does not handle the "File" media type, so I have to fix that in the plugin.

    Comment

    Working...
    X