Few changes
This commit is contained in:
parent
dd71f707f6
commit
1ace8c7e32
@ -5,9 +5,7 @@ poetry config virtualenvs.in-project true
|
|||||||
poetry lock --no-update
|
poetry lock --no-update
|
||||||
poetry install
|
poetry install
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install ffmpeg
|
sudo apt-get install ffmpeg aria2 mkvtoolnix libmediainfo0v5
|
||||||
sudo apt-get install aria2
|
|
||||||
sudo apt install mkvtoolnix
|
|
||||||
ffmpeg --version
|
ffmpeg --version
|
||||||
ffprobe --version
|
ffprobe --version
|
||||||
ffplay --version
|
ffplay --version
|
||||||
|
|||||||
@ -168,11 +168,11 @@ def get_cookie_jar(service, profile):
|
|||||||
return cookie_jar
|
return cookie_jar
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def save_cookies(service, profile):
|
def save_cookies(service_name, service, profile):
|
||||||
"""Save cookies from service session to profile's cookies."""
|
"""Save cookies from service session to profile's cookies."""
|
||||||
cookie_file = os.path.join(directories.cookies, service.lower(), f"{profile}.txt")
|
cookie_file = os.path.join(directories.cookies, service_name.lower(), f"{profile}.txt")
|
||||||
if not os.path.isfile(cookie_file):
|
if not os.path.isfile(cookie_file):
|
||||||
cookie_file = os.path.join(directories.cookies, service, f"{profile}.txt")
|
cookie_file = os.path.join(directories.cookies, service_name , f"{profile}.txt")
|
||||||
|
|
||||||
if os.path.isfile(cookie_file):
|
if os.path.isfile(cookie_file):
|
||||||
cookie_jar = MozillaCookieJar(cookie_file)
|
cookie_jar = MozillaCookieJar(cookie_file)
|
||||||
@ -489,7 +489,7 @@ def result(ctx, service, quality, closest_resolution, range_, wanted, alang, sla
|
|||||||
proxy = None
|
proxy = None
|
||||||
|
|
||||||
if service:
|
if service:
|
||||||
save_cookies(service, ctx.obj.profile)
|
save_cookies(service_name, service, ctx.obj.profile)
|
||||||
track.download(directories.temp, headers=service.session.headers, proxy=proxy)
|
track.download(directories.temp, headers=service.session.headers, proxy=proxy)
|
||||||
log.info(" + Downloaded")
|
log.info(" + Downloaded")
|
||||||
if isinstance(track, VideoTrack) and track.needs_ccextractor_first and not no_subs:
|
if isinstance(track, VideoTrack) and track.needs_ccextractor_first and not no_subs:
|
||||||
@ -563,7 +563,7 @@ def result(ctx, service, quality, closest_resolution, range_, wanted, alang, sla
|
|||||||
raise log.exit("Unable to license")
|
raise log.exit("Unable to license")
|
||||||
|
|
||||||
if service:
|
if service:
|
||||||
save_cookies(service, ctx.obj.profile)
|
save_cookies(service_name, service, ctx.obj.profile)
|
||||||
content_keys = [
|
content_keys = [
|
||||||
(str(x.kid).replace("-", ""), x.key.hex()) for x in ctx.obj.cdm.get_keys(session_id) if x.type == "CONTENT"
|
(str(x.kid).replace("-", ""), x.key.hex()) for x in ctx.obj.cdm.get_keys(session_id) if x.type == "CONTENT"
|
||||||
] if "common_privacy_cert" in dir(ctx.obj.cdm) else [
|
] if "common_privacy_cert" in dir(ctx.obj.cdm) else [
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user