mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
Use TranscodingUrl if available
This commit is contained in:
parent
d402e3d0dd
commit
c37652ccd7
1 changed files with 18 additions and 10 deletions
|
@ -146,7 +146,7 @@ class PlayUtils():
|
||||||
else:
|
else:
|
||||||
source['Path'] = self.get_http_path(source, True if not source['SupportsDirectStream'] else self.force_transcode)
|
source['Path'] = self.get_http_path(source, True if not source['SupportsDirectStream'] else self.force_transcode)
|
||||||
|
|
||||||
log.debug('get source: %s', source)
|
log.debug("get source: %s", source)
|
||||||
return source
|
return source
|
||||||
|
|
||||||
def is_file_exists(self, source):
|
def is_file_exists(self, source):
|
||||||
|
@ -271,6 +271,14 @@ class PlayUtils():
|
||||||
|
|
||||||
self.method = "Transcode"
|
self.method = "Transcode"
|
||||||
|
|
||||||
|
if 'TranscodingUrl' in source:
|
||||||
|
base, params = source['TranscodingUrl'].split("?")
|
||||||
|
url_parsed = params.split("&")
|
||||||
|
for i in url_parsed:
|
||||||
|
if 'AudioStreamIndex' in i or 'AudioBitrate' in i: #handle manually
|
||||||
|
url_parsed.remove(i)
|
||||||
|
url = "%s/emby%s?%s" % (self.server, base.replace("stream", "master"), '&'.join(url_parsed))
|
||||||
|
else:
|
||||||
item_id = self.item['Id']
|
item_id = self.item['Id']
|
||||||
url = urllib_path("%s/emby/Videos/%s/master.m3u8" % (self.server, item_id), {
|
url = urllib_path("%s/emby/Videos/%s/master.m3u8" % (self.server, item_id), {
|
||||||
|
|
||||||
|
@ -528,7 +536,7 @@ class PlayUtils():
|
||||||
"Type": 0
|
"Type": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Container": "ts",
|
"Container": "m3u8",
|
||||||
"AudioCodec": "ac3",
|
"AudioCodec": "ac3",
|
||||||
"VideoCodec": "h264",
|
"VideoCodec": "h264",
|
||||||
"Type": 1
|
"Type": 1
|
||||||
|
|
Loading…
Reference in a new issue