diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index a7b615ab..42717962 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -456,7 +456,7 @@ def _playback_cleanup(ended=False): # Remember the last played item later app.PLAYSTATE.old_player_states[playerid] = copy.deepcopy(status) # Stop transcoding - if status['playmethod'] == 'Transcode': + if status['playmethod'] == v.PLAYBACK_METHOD_TRANSCODE: LOG.debug('Tell the PMS to stop transcoding') DU().downloadUrl( '{server}/video/:/transcode/universal/stop', diff --git a/resources/lib/playback.py b/resources/lib/playback.py index f32b0297..6d71b7d8 100644 --- a/resources/lib/playback.py +++ b/resources/lib/playback.py @@ -473,9 +473,10 @@ def _conclude_playback(playqueue, pos): _ensure_resolve() return listitem.setPath(item.file.encode('utf-8')) - if item.playmethod == 'DirectStream': + if item.playmethod == v.PLAYBACK_METHOD_DIRECT_PLAY: listitem.setSubtitles(api.cache_external_subs()) - elif item.playmethod == 'Transcode': + elif item.playmethod in (v.PLAYBACK_METHOD_DIRECT_STREAM, + v.PLAYBACK_METHOD_TRANSCODE): playutils.audio_subtitle_prefs(listitem) _set_resume(listitem, item, api) transfer.send(listitem) @@ -518,7 +519,7 @@ def process_indirect(key, offset, resolve=True): playqueue.clear() item = PL.playlist_item_from_xml(xml[0]) item.offset = offset - item.playmethod = 'DirectStream' + item.playmethod = v.PLAYBACK_METHOD_DIRECT_PLAY # Need to get yet another xml to get the final playback url try: