mirror of
https://github.com/jellyfin/jellycon.git
synced 2025-02-21 14:21:30 +00:00
Ensure a handle is valid before trying to use it to start playback
This commit is contained in:
parent
2f3fe8ae6b
commit
34861fb9b9
@ -458,11 +458,14 @@ def play_file(play_info):
|
||||
playlist.add(playurl, list_item)
|
||||
player.play(playlist)
|
||||
else:
|
||||
if len(sys.argv) > 1:
|
||||
# Play from within addon
|
||||
if len(sys.argv) > 1 and int(sys.argv[1]) > 0:
|
||||
# Play from info menu
|
||||
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, list_item)
|
||||
else:
|
||||
# Play from remote control. Doesn't have a handle, so need to call player directly
|
||||
'''
|
||||
Play from remote control or addon menus. Doesn't have a handle,
|
||||
so need to call player directly
|
||||
'''
|
||||
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
||||
playlist.clear()
|
||||
playlist.add(playurl, list_item)
|
||||
|
Loading…
x
Reference in New Issue
Block a user