2023-07-02, 04:13
I've got something which has me scratching my head. I am trying to play a playlist from a context menu. Here's the context menu code:
If I put a real URL in instead of genmulist it will play the URL. In the logs I see the following with genmulist :
2023-07-01 22:03:58.621 T:19492 info <general>: Creating InputStream
2023-07-01 22:03:58.684 T:19492 error <general>: CVideoPlayer::OpenInputStream - error opening [<xbmc.PlayList object at 0x000002222279CC30>]
2023-07-01 22:03:58.684 T:19492 info <general>: CVideoPlayer::OnExit()
I think the problem may be the %s to pass a playlist. The playlist is created by each list item getting:
genmulist.add(url=itemurl, listitem=li)
I am pretty sure the playlist itself is fine and I am just missing something very obvious. I've confirmed the playlist works by adding:
and it starts playing. I just want to launch this from a context menu item.
Thanks,
Jeff
Context Menu:li.addContextMenuItems([ (menuitem1, 'Container.Refresh'), (menuitem2, 'Action(ParentDir)'), \
('Play Playlist', 'PlayMedia(%s)' % (genmulist)) ])
If I put a real URL in instead of genmulist it will play the URL. In the logs I see the following with genmulist :
2023-07-01 22:03:58.621 T:19492 info <general>: Creating InputStream
2023-07-01 22:03:58.684 T:19492 error <general>: CVideoPlayer::OpenInputStream - error opening [<xbmc.PlayList object at 0x000002222279CC30>]
2023-07-01 22:03:58.684 T:19492 info <general>: CVideoPlayer::OnExit()
I think the problem may be the %s to pass a playlist. The playlist is created by each list item getting:
genmulist.add(url=itemurl, listitem=li)
I am pretty sure the playlist itself is fine and I am just missing something very obvious. I've confirmed the playlist works by adding:
Code:
xbmc.Player().play(genmulist)
and it starts playing. I just want to launch this from a context menu item.
Thanks,
Jeff