mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 21:46:44 +00:00
Resume partial downloads unless the .clean
file is found
This commit is contained in:
parent
e01301e1ce
commit
f9eb571dd8
@ -296,7 +296,10 @@ def download_media(
|
|||||||
temp_dir_parent = ytopts['paths']['temp']
|
temp_dir_parent = ytopts['paths']['temp']
|
||||||
temp_dir_prefix = f'{temp_dir_prefix}{v_key}-'
|
temp_dir_prefix = f'{temp_dir_prefix}{v_key}-'
|
||||||
temp_dir_obj = TemporaryDirectory(prefix=temp_dir_prefix,dir=temp_dir_parent)
|
temp_dir_obj = TemporaryDirectory(prefix=temp_dir_prefix,dir=temp_dir_parent)
|
||||||
temp_dir_path = Path(temp_dir_obj.name)
|
if temp_dir_obj and (Path(temp_dir_parent) / '.clean').exists():
|
||||||
|
temp_dir_path = Path(temp_dir_obj.name)
|
||||||
|
else:
|
||||||
|
temp_dir_path = Path(temp_dir_parent)
|
||||||
(temp_dir_path / '.ignore').touch(exist_ok=True)
|
(temp_dir_path / '.ignore').touch(exist_ok=True)
|
||||||
ytopts['paths'].update({
|
ytopts['paths'].update({
|
||||||
'home': str(output_dir),
|
'home': str(output_dir),
|
||||||
|
Loading…
Reference in New Issue
Block a user