I am writing a personal service addon, the feature I am focusing on now is playing a playlist once a GPIO button is triggered. The .pls playlist is built by a different script.
As the title says, I am trying to load a pre-existing .pls playlist then play it. I feel like I’m either doing this totally wrong or I am missing something small. I have searched google and these forums and haven’t found anything similar to my problem. Here is the simplified code I am using to load the .pls file:
pl_1 = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
pl_1.load("/home/osmc/playlists/playlist_4.pls")
xbmc.Player().play(pl_1)
I know there are other ways to load a playlist but I would like to load it directly from the .pls file. The xmbc documentation for Kodi 16 says:
load(...)
load(filename) -- Load a playlist.
clear current playlist and copy items from the file to this Playlist filename can be like .pls or .m3u ...
returns False if unable to load playlist
Here is my .pls file as well:
[Playlist]
File1=/media/USB DISK/video3/10SecCountdown.mp4
File2=/media/USB DISK/video3/720p_2ch_mjk11.avi
File3=/media/USB DISK/video3/Blacklist.mkv
File4=/media/USB DISK/video3/thisMightWork.MOV
NumberOfEntries=4
Version=2
Thanks for the help!