mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Add force transcode settings
This commit is contained in:
parent
14c07ce42f
commit
4ecd3fa2f6
3 changed files with 12 additions and 6 deletions
|
@ -881,3 +881,7 @@ msgstr ""
|
|||
msgctxt "#33178"
|
||||
msgid "Processing updates"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#33179"
|
||||
msgid "Force transcode"
|
||||
msgstr ""
|
||||
|
|
|
@ -52,13 +52,14 @@ class Actions(object):
|
|||
listitem = xbmcgui.ListItem()
|
||||
LOG.info("[ play/%s ] %s", item['Id'], item['Name'])
|
||||
|
||||
playlist = self.get_playlist(item)
|
||||
transcode = transcode or settings('playFromTranscode.bool')
|
||||
kodi_playlist = self.get_playlist(item)
|
||||
play = playutils.PlayUtils(item, transcode, self.server_id, self.server)
|
||||
source = play.select_source(play.get_sources())
|
||||
play.set_external_subs(source, listitem)
|
||||
|
||||
self.set_playlist(item, listitem, db_id, transcode)
|
||||
index = max(playlist.getposition(), 0) + 1 # Can return -1
|
||||
index = max(kodi_playlist.getposition(), 0) + 1 # Can return -1
|
||||
force_play = False
|
||||
|
||||
self.stack[0][1].setPath(self.stack[0][0])
|
||||
|
@ -75,12 +76,12 @@ class Actions(object):
|
|||
|
||||
for stack in self.stack:
|
||||
|
||||
playlist.add(url=stack[0], listitem=stack[1], index=index)
|
||||
kodi_playlist.add(url=stack[0], listitem=stack[1], index=index)
|
||||
index += 1
|
||||
|
||||
if force_play:
|
||||
if len(sys.argv) > 1: xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, self.stack[0][1])
|
||||
xbmc.Player().play(playlist, windowed=False)
|
||||
xbmc.Player().play(kodi_playlist, windowed=False)
|
||||
|
||||
def set_playlist(self, item, listitem, db_id=None, transcode=False):
|
||||
|
||||
|
|
|
@ -41,8 +41,9 @@
|
|||
<setting label="30518" id="enableCinema" type="bool" default="true" />
|
||||
<setting label="30519" id="askCinema" type="bool" default="false" visible="eq(-1,true)" subsetting="true" />
|
||||
<setting label="30002" id="playFromStream" type="bool" default="true" />
|
||||
<setting label="30522" id="transcode_h265" type="bool" default="false" />
|
||||
<setting label="30537" id="transcodeHi10P" type="bool" default="false"/>
|
||||
<setting label="33179" id="playFromTranscode" type="bool" default="false" visible="eq(-1,true)" subsetting="true" />
|
||||
<setting label="30522" id="transcode_h265" type="bool" default="false" visible="eq(-1,false)" />
|
||||
<setting label="30537" id="transcodeHi10P" type="bool" default="false" visible="eq(-2,false)" />
|
||||
<setting label="33114" id="enableExternalSubs" type="bool" default="true" />
|
||||
<setting label="33159" id="skipDialogTranscode" type="enum" lvalues="305|33157|33158|13106" visible="true" default="3" />
|
||||
<setting label="33115" type="lsep" />
|
||||
|
|
Loading…
Reference in a new issue