if when getting the playbackinfo there is an error show user the error

This commit is contained in:
faush01 2019-10-02 15:29:16 +10:00
parent fbf9676949
commit 0a450e2c2e

View File

@ -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")