✨ Check if download was successful before adding path to m3u creation.
This commit is contained in:
@@ -285,7 +285,7 @@ class Download:
|
|||||||
quality_audio: Quality | None = None,
|
quality_audio: Quality | None = None,
|
||||||
quality_video: QualityVideo | None = None,
|
quality_video: QualityVideo | None = None,
|
||||||
is_parent_album: bool = False,
|
is_parent_album: bool = False,
|
||||||
) -> (bool, str):
|
) -> (bool, pathlib.Path):
|
||||||
try:
|
try:
|
||||||
if media_id and media_type:
|
if media_id and media_type:
|
||||||
# If no media instance is provided, we need to create the media instance.
|
# If no media instance is provided, we need to create the media instance.
|
||||||
@@ -710,6 +710,8 @@ class Download:
|
|||||||
for future in futures.as_completed(l_futures):
|
for future in futures.as_completed(l_futures):
|
||||||
# Retrieve result
|
# Retrieve result
|
||||||
status, result_path_file = future.result()
|
status, result_path_file = future.result()
|
||||||
|
|
||||||
|
if status:
|
||||||
result_dirs.append(result_path_file.parent)
|
result_dirs.append(result_path_file.parent)
|
||||||
|
|
||||||
# Advance progress bar.
|
# Advance progress bar.
|
||||||
|
|||||||
Reference in New Issue
Block a user