Correctly stop transcoding
This commit is contained in:
parent
e5e70f769e
commit
a089dc6e04
2 changed files with 9 additions and 10 deletions
|
@ -1899,15 +1899,14 @@ class API():
|
||||||
url += '?' + urlencode(xargs)
|
url += '?' + urlencode(xargs)
|
||||||
return url
|
return url
|
||||||
|
|
||||||
# For Direct Streaming or Transcoding
|
# For Transcoding
|
||||||
from uuid import uuid4
|
|
||||||
# Path/key to VIDEO item of xml PMS response is needed, not part
|
# Path/key to VIDEO item of xml PMS response is needed, not part
|
||||||
path = self.item.attrib['key']
|
path = self.item.attrib['key']
|
||||||
transcodePath = self.server + \
|
transcodePath = self.server + \
|
||||||
'/video/:/transcode/universal/start.m3u8?'
|
'/video/:/transcode/universal/start.m3u8?'
|
||||||
args = {
|
args = {
|
||||||
'protocol': 'hls', # seen in the wild: 'dash', 'http', 'hls'
|
'protocol': 'hls', # seen in the wild: 'dash', 'http', 'hls'
|
||||||
'session': str(uuid4()),
|
'session': clientinfo.ClientInfo().getDeviceId(),
|
||||||
'fastSeek': 1,
|
'fastSeek': 1,
|
||||||
'path': path,
|
'path': path,
|
||||||
'mediaIndex': 0, # Probably refering to XML reply sheme
|
'mediaIndex': 0, # Probably refering to XML reply sheme
|
||||||
|
|
|
@ -545,10 +545,10 @@ class Player(xbmc.Player):
|
||||||
|
|
||||||
# Stop transcoding
|
# Stop transcoding
|
||||||
if playMethod == "Transcode":
|
if playMethod == "Transcode":
|
||||||
log("Transcoding for %s terminated." % itemid, 1)
|
log("Transcoding for %s terminating" % itemid, 1)
|
||||||
deviceId = self.clientInfo.getDeviceId()
|
doUtils(
|
||||||
url = "{server}/emby/Videos/ActiveEncodings?DeviceId=%s" % deviceId
|
"{server}/video/:/transcode/universal/stop",
|
||||||
doUtils(url, type="DELETE")
|
parameters={'session': self.clientInfo.getDeviceId()})
|
||||||
|
|
||||||
self.played_info.clear()
|
self.played_info.clear()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue