Merge pull request #1669 from croneter/stream-option
Add playback settings to let the user choose whether Plex or Kodi provides the default audio or subtitle stream on playback start [backport]
This commit is contained in:
commit
191a3131e3
3 changed files with 17 additions and 1 deletions
|
@ -665,6 +665,16 @@ msgctxt "#30546"
|
||||||
msgid "Pick the first video if several versions are present"
|
msgid "Pick the first video if several versions are present"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
# PKC Settings - Playback
|
||||||
|
msgctxt "#30547"
|
||||||
|
msgid "Who picks the audio stream on playback start?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
# PKC Settings - Playback
|
||||||
|
msgctxt "#30548"
|
||||||
|
msgid "Who picks subtitles on playback start?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
# Welcome to Plex notification
|
# Welcome to Plex notification
|
||||||
msgctxt "#33000"
|
msgctxt "#33000"
|
||||||
msgid "Welcome"
|
msgid "Welcome"
|
||||||
|
|
|
@ -29,6 +29,7 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
"""
|
"""
|
||||||
PKC implementation of the Kodi Monitor class. Invoke only once.
|
PKC implementation of the Kodi Monitor class. Invoke only once.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._already_slept = False
|
self._already_slept = False
|
||||||
self._switched_to_plex_streams = True
|
self._switched_to_plex_streams = True
|
||||||
|
@ -390,7 +391,10 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
if not self._switched_to_plex_streams:
|
if not self._switched_to_plex_streams:
|
||||||
# We need to switch to the Plex streams ONCE upon playback start
|
# We need to switch to the Plex streams ONCE upon playback start
|
||||||
# after onavchange has been fired
|
# after onavchange has been fired
|
||||||
item.switch_to_plex_streams()
|
if utils.settings('audioStreamPick') == '0':
|
||||||
|
item.switch_to_plex_stream('audio')
|
||||||
|
if utils.settings('subtitleStreamPick') == '0':
|
||||||
|
item.switch_to_plex_stream('subtitle')
|
||||||
self._switched_to_plex_streams = True
|
self._switched_to_plex_streams = True
|
||||||
else:
|
else:
|
||||||
item.on_av_change(playerid)
|
item.on_av_change(playerid)
|
||||||
|
|
|
@ -114,6 +114,8 @@
|
||||||
<setting id="trailerNumber" type="slider" label="39000" default="3" visible="eq(-2,true)" range="1,1,15" option="int" />
|
<setting id="trailerNumber" type="slider" label="39000" default="3" visible="eq(-2,true)" range="1,1,15" option="int" />
|
||||||
<setting id="enableSkipIntro" type="bool" label="30525" default="true" /><!-- Enable skipping of intros -->
|
<setting id="enableSkipIntro" type="bool" label="30525" default="true" /><!-- Enable skipping of intros -->
|
||||||
<setting id="firstVideoStream" type="bool" label="30546" default="false" /><!-- Pick the first video if several versions are present -->
|
<setting id="firstVideoStream" type="bool" label="30546" default="false" /><!-- Pick the first video if several versions are present -->
|
||||||
|
<setting id="audioStreamPick" type="enum" label="30547" values="Plex|Kodi" default="0" /><!-- Who picks the audio stream on playback start? -->
|
||||||
|
<setting id="subtitleStreamPick" type="enum" label="30548" values="Plex|Kodi" default="0" /><!-- Who picks subtitles on playback start? -->
|
||||||
<setting id="ignoreSpecialsNextEpisodes" type="bool" label="30527" default="false" />
|
<setting id="ignoreSpecialsNextEpisodes" type="bool" label="30527" default="false" />
|
||||||
<setting id="resumeJumpBack" type="slider" label="30521" default="10" range="0,1,120" option="int" visible="false"/>
|
<setting id="resumeJumpBack" type="slider" label="30521" default="10" range="0,1,120" option="int" visible="false"/>
|
||||||
<setting type="sep" />
|
<setting type="sep" />
|
||||||
|
|
Loading…
Reference in a new issue