Small change to resume download
This commit is contained in:
parent
93fdfebc69
commit
bfbda1dff4
@ -624,7 +624,7 @@ def result(ctx, service, quality, closest_resolution, range_, wanted, alang, sla
|
|||||||
f"label=1:key_id=00000000000000000000000000000000:key={track.key.lower()}",
|
f"label=1:key_id=00000000000000000000000000000000:key={track.key.lower()}",
|
||||||
]) if service_name not in ["DisneyPlus", "Hulu"] else
|
]) if service_name not in ["DisneyPlus", "Hulu"] else
|
||||||
",".join(
|
",".join(
|
||||||
[# This right here is a hack as DSNP sometimes has 2 kids and returns 2 keys. FFS.
|
[# This right here is a hack as DSNP/HULU sometimes has 2 kids and returns 2 keys. FFS.
|
||||||
"label={}:key_id={}:key={}".format(
|
"label={}:key_id={}:key={}".format(
|
||||||
content_keys.index(pair),
|
content_keys.index(pair),
|
||||||
pair[0],
|
pair[0],
|
||||||
|
|||||||
@ -337,9 +337,12 @@ class Track:
|
|||||||
)
|
)
|
||||||
self.url = segments
|
self.url = segments
|
||||||
|
|
||||||
if Path(save_path).is_file() and not (os.stat(save_path).st_size <= 3):
|
if (Path(save_path).is_file() or Path(os.path.splitext(save_path)[0] + ".dec.mp4").is_file()) and not (os.stat(save_path).st_size <= 3):
|
||||||
log = logging.getLogger("Tracks")
|
log = logging.getLogger("Tracks")
|
||||||
log.info("File already exists, assuming it's from previous unfinished download")
|
log.info("File already exists, assuming it's from previous unfinished download")
|
||||||
|
|
||||||
|
if Path(os.path.splitext(save_path)[0] + ".dec.mp4").is_file():
|
||||||
|
self.encrypted = False
|
||||||
self._location = save_path
|
self._location = save_path
|
||||||
return save_path
|
return save_path
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user