Minor changes
This commit is contained in:
parent
3e3fb73516
commit
62030d9527
@ -624,7 +624,7 @@ def result(ctx, service, quality, closest_resolution, range_, wanted, alang, sla
|
||||
executable = next((x for x in (shutil.which(x) for x in names) if x), None)
|
||||
if not executable:
|
||||
raise log.exit(" - Unable to find packager binary")
|
||||
dec = os.path.splitext(track.locate())[0].replace("enc", "dec.mp4")
|
||||
dec = os.path.splitext(track.locate())[0].replace("enc", "dec") + ".mp4"
|
||||
|
||||
os.makedirs(directories.temp, exist_ok=True)
|
||||
try:
|
||||
@ -663,7 +663,7 @@ def result(ctx, service, quality, closest_resolution, range_, wanted, alang, sla
|
||||
executable = shutil.which("mp4decrypt")
|
||||
if not executable:
|
||||
raise log.exit(" - Unable to find mp4decrypt binary")
|
||||
dec = os.path.splitext(track.locate())[0].replace("enc", "dec.mp4")
|
||||
dec = os.path.splitext(track.locate())[0].replace("enc", "dec") + ".mp4"
|
||||
os.makedirs(directories.temp, exist_ok=True)
|
||||
try:
|
||||
os.makedirs(directories.temp, exist_ok=True)
|
||||
|
||||
@ -200,7 +200,7 @@ class Track:
|
||||
kid = next(iter(xml.xpath("PROTECTINFO/KID/@VALUE")), None)
|
||||
if not kid: # v4.3.0.0
|
||||
kid = next(iter(xml.xpath("PROTECTINFO/KIDS/KID/@VALUE")), None) # can be multiple?
|
||||
self.kid = uuid.UUID(base64.b64decode(self.kid).hex()).bytes_le.hex()
|
||||
self.kid = uuid.UUID(base64.b64decode(kid).hex()).bytes_le.hex()
|
||||
#if not track.psshWV:
|
||||
# self.psshWV = Box.parse(Box.build(dict(
|
||||
# type=b"pssh",
|
||||
@ -240,7 +240,7 @@ class Track:
|
||||
xml_str = base64.b64decode(self.psshPR).decode("utf-16-le", "ignore")
|
||||
xml_str = xml_str[xml_str.index("<"):]
|
||||
kids = [uuid.UUID(base64.b64decode(kid_xml['@VALUE']).hex()).bytes_le.hex() for kid_xml in xmltodict.parse(xml_str)['WRMHEADER']['DATA']['CUSTOMATTRIBUTES']['KIDS']['KID']]
|
||||
self.kid = kids[-1]
|
||||
self.kid = kids[-1] #Choose a random one cuz DSNP gives two for some reason
|
||||
|
||||
self.kid = uuid.UUID(base64.b64decode(self.kid).hex()).bytes_le.hex()
|
||||
|
||||
@ -1226,7 +1226,7 @@ class Tracks:
|
||||
)
|
||||
|
||||
except: pass
|
||||
|
||||
|
||||
else:
|
||||
if by_codec:
|
||||
by_codec = by_codec.split(",")
|
||||
|
||||
@ -281,7 +281,7 @@ class AppleTVPlus(BaseService):
|
||||
if not e.response.text:
|
||||
raise self.log.exit(" - No license returned!")
|
||||
raise self.log.exit(f" - Unable to obtain license (error code: {e.response.json()['errorCode']})")
|
||||
return res['streaming-response']['streaming-keys'][0]["license"]
|
||||
return base64.b64decode(res['streaming-response']['streaming-keys'][0]["license"])
|
||||
|
||||
# Service specific functions
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user