fix problem in download.py when title has not been set
This commit is contained in:
@@ -63,6 +63,9 @@ def __parse_output__(lines_list: list[str]) -> str | None:
|
|||||||
|
|
||||||
def is_file_downloaded(media_file: dict, dir: Path) -> FileStatus:
|
def is_file_downloaded(media_file: dict, dir: Path) -> FileStatus:
|
||||||
file_name_as_title = f"{media_file['file_name']}"
|
file_name_as_title = f"{media_file['file_name']}"
|
||||||
|
if not file_name_as_title:
|
||||||
|
log.info("title has not been set - start download")
|
||||||
|
return FileStatus.UNKNOWN
|
||||||
file_title = Path(dir, f"{file_name_as_title}.mp4")
|
file_title = Path(dir, f"{file_name_as_title}.mp4")
|
||||||
if file_title.exists():
|
if file_title.exists():
|
||||||
log.info(f"{file_name_as_title} has been downloaded")
|
log.info(f"{file_name_as_title} has been downloaded")
|
||||||
|
|||||||
Reference in New Issue
Block a user