mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Convert parameters to int if they are not None
This commit is contained in:
parent
4e34537c5f
commit
84f111843c
1 changed files with 5 additions and 1 deletions
|
@ -155,6 +155,10 @@ class Player(xbmc.Player):
|
||||||
LOG.info("-->[ play/%s ] %s", item['Id'], item)
|
LOG.info("-->[ play/%s ] %s", item['Id'], item)
|
||||||
|
|
||||||
def set_audio_subs(self, audio=None, subtitle=None):
|
def set_audio_subs(self, audio=None, subtitle=None):
|
||||||
|
if audio:
|
||||||
|
audio=int(audio)
|
||||||
|
if subtitle:
|
||||||
|
subtitle=int(subtitle)
|
||||||
|
|
||||||
''' Only for after playback started
|
''' Only for after playback started
|
||||||
'''
|
'''
|
||||||
|
@ -169,7 +173,7 @@ class Player(xbmc.Player):
|
||||||
if audio and len(self.getAvailableAudioStreams()) > 1:
|
if audio and len(self.getAvailableAudioStreams()) > 1:
|
||||||
self.setAudioStream(audio - 1)
|
self.setAudioStream(audio - 1)
|
||||||
|
|
||||||
if subtitle == -1 or subtitle is None:
|
if subtitle is None or subtitle == -1:
|
||||||
self.showSubtitles(False)
|
self.showSubtitles(False)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue