mirror of
https://github.com/jellyfin/jellycon.git
synced 2024-11-23 22:19:54 +00:00
if when getting the playbackinfo there is an error show user the error
This commit is contained in:
parent
fbf9676949
commit
0a450e2c2e
@ -44,6 +44,12 @@ def playAllFiles(items, monitor):
|
||||
if playback_info is None:
|
||||
log.debug("playback_info was None, could not get MediaSources so can not play!")
|
||||
return
|
||||
if playback_info.get("ErrorCode") is not None:
|
||||
error_string = playback_info.get("ErrorCode")
|
||||
xbmcgui.Dialog().notification(string_load(30316),
|
||||
error_string,
|
||||
icon="special://home/addons/plugin.video.embycon/icon.png")
|
||||
return
|
||||
|
||||
# play_session_id = id_generator()
|
||||
play_session_id = playback_info.get("PlaySessionId")
|
||||
@ -141,6 +147,12 @@ def add_to_playlist(play_info, monitor):
|
||||
if playback_info is None:
|
||||
log.debug("playback_info was None, could not get MediaSources so can not play!")
|
||||
return
|
||||
if playback_info.get("ErrorCode") is not None:
|
||||
error_string = playback_info.get("ErrorCode")
|
||||
xbmcgui.Dialog().notification(string_load(30316),
|
||||
error_string,
|
||||
icon="special://home/addons/plugin.video.embycon/icon.png")
|
||||
return
|
||||
|
||||
# play_session_id = id_generator()
|
||||
play_session_id = playback_info.get("PlaySessionId")
|
||||
@ -280,6 +292,12 @@ def playFile(play_info, monitor):
|
||||
if playback_info is None:
|
||||
log.debug("playback_info was None, could not get MediaSources so can not play!")
|
||||
return
|
||||
if playback_info.get("ErrorCode") is not None:
|
||||
error_string = playback_info.get("ErrorCode")
|
||||
xbmcgui.Dialog().notification(string_load(30316),
|
||||
error_string,
|
||||
icon="special://home/addons/plugin.video.embycon/icon.png")
|
||||
return
|
||||
|
||||
#play_session_id = id_generator()
|
||||
play_session_id = playback_info.get("PlaySessionId")
|
||||
|
Loading…
Reference in New Issue
Block a user