Fix regression: labeling of playmethods

This commit is contained in:
croneter 2019-10-05 12:43:12 +02:00
parent 21bf68e148
commit b0fbb3ac09
2 changed files with 5 additions and 4 deletions

View file

@ -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',

View file

@ -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: