Fix wording: "direct path" is not "direct play"

This commit is contained in:
croneter 2019-08-17 13:00:02 +02:00
parent 816913031c
commit 7bb469702a
5 changed files with 12 additions and 11 deletions

View file

@ -963,7 +963,7 @@ msgstr ""
# PKC Settings - Customize paths
msgctxt "#39056"
msgid "Used by Sync and when attempting to Direct Play"
msgid "Used by Sync and when attempting to use Direct Paths"
msgstr ""
# PKC Settings, category name

View file

@ -158,7 +158,7 @@ class PlaylistItem(object):
uri = None [str] PMS path to item; will be auto-set with plex_id
guid = None [str] Weird Plex guid
xml = None [etree] XML from PMS, 1 lvl below <MediaContainer>
playmethod = None [str] either 'DirectPlay', 'DirectStream', 'Transcode'
playmethod = None [str] either 'DirectPath', 'DirectStream', 'Transcode'
playcount = None [int] how many times the item has already been played
offset = None [int] the item's view offset UPON START in Plex time
part = 0 [int] part number if Plex video consists of mult. parts

View file

@ -29,10 +29,10 @@ class PlayUtils():
"""
if self.api.mediastream_number() is None:
return
playurl = self.isDirectPlay()
playurl = self.direct_path()
if playurl is not None:
LOG.info("File is direct playing.")
self.item.playmethod = 'DirectPlay'
self.item.playmethod = 'DirectPath'
elif self.isDirectStream():
LOG.info("File is direct streaming.")
playurl = self.api.transcode_video_path('DirectStream')
@ -53,9 +53,10 @@ class PlayUtils():
self.item.file = playurl
return playurl
def isDirectPlay(self):
def direct_path(self):
"""
Returns the path/playurl if we can direct play, None otherwise
Returns the path if we can use direct paths and the path is accessible
Returns None otherwise
"""
# True for e.g. plex.tv watch later
if self.api.should_stream() is True:
@ -68,11 +69,11 @@ class PlayUtils():
return self.api.validate_playurl(path,
self.api.plex_type,
force_check=True)
# set to either 'Direct Stream=1' or 'Transcode=2'
# and NOT to 'Direct Play=0'
# set to either 'Direct Play=1' or 'Transcode=2'
# and NOT to 'Try Direct Path=0'
if utils.settings('playType') != "0":
# User forcing to play via HTTP
LOG.info("User chose to not direct play")
LOG.info("User chose to not use direct paths")
return
if self.mustTranscode():
return

View file

@ -226,7 +226,7 @@ class Media(object):
return
quality = {} if quality is None else quality
xargs = clientinfo.getXArgsDeviceInfo()
# For DirectPlay, path/key of PART is needed
# For DirectPath, path/key of PART is needed
# trailers are 'clip' with PMS xmls
if action == "DirectStream":
path = self.xml[self.mediastream][self.part].get('key')

View file

@ -111,7 +111,7 @@
<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 type="sep" />
<setting id="playType" type="enum" label="30002" values="Direct Play (default)|Direct Stream|Force Transcode" default="0" />
<setting id="playType" type="enum" label="30002" values="Try Direct Path|Direct Play|Force Transcode" default="0" />
<setting id="transcoderVideoQualities" type="enum" label="30160" values="420x420, 320kbps|576x320, 720kbps|720x480, 1.5Mbps|1024x768, 2Mbps|1280x720, 3Mbps|1280x720, 4Mbps|1920x1080, 8Mbps|1920x1080, 10Mbps|1920x1080, 12Mbps|1920x1080, 20Mbps|1920x1080, 40Mbps" default="10" /><!-- Video Quality if Transcoding necessary -->
<setting id="maxVideoQualities" type="enum" label="30143" values="320kbps|720kbps|1.5Mbps|2Mbps|3Mbps|4Mbps|8Mbps|10Mbps|12Mbps|20Mbps|40Mbps|deactivated" default="11" /><!-- Always transcode if video bitrate is above -->
<setting id="transcodeH265" type="enum" label="30522" default="0" values="Disabled (default)|480p (and higher)|720p (and higher)|1080p" /><!-- Force transcode h265/HEVC -->