Fix audio/sub change

Only for addon playback
This commit is contained in:
angelblue05 2018-12-13 15:10:24 -06:00
parent 3dc72287b3
commit 0926c0b5b4
2 changed files with 3 additions and 1 deletions

View file

@ -38,6 +38,7 @@ def set_properties(item, method, server_id=None):
'Id': item['Id'], 'Id': item['Id'],
'Path': info['Path'], 'Path': info['Path'],
'PlayMethod': method, 'PlayMethod': method,
'PlayOption': 'Addon' if info.get('PlaySessionId') else 'Native',
'MediaSourceId': info.get('MediaSourceId', item['Id']), 'MediaSourceId': info.get('MediaSourceId', item['Id']),
'Runtime': item.get('RunTimeTicks'), 'Runtime': item.get('RunTimeTicks'),
'PlaySessionId': info.get('PlaySessionId', str(uuid4()).replace("-", "")), 'PlaySessionId': info.get('PlaySessionId', str(uuid4()).replace("-", "")),

View file

@ -118,7 +118,8 @@ class Player(xbmc.Player):
if monitor.waitForAbort(2): if monitor.waitForAbort(2):
return return
self.set_audio_subs(item['AudioStreamIndex'], item['SubtitleStreamIndex']) if item['PlayOption'] == 'Addon':
self.set_audio_subs(item['AudioStreamIndex'], item['SubtitleStreamIndex'])
def set_item(self, file, item): def set_item(self, file, item):