From e283281f517ef5993d55e875101a2357fdedeb4a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 24 Apr 2020 18:42:09 +0200 Subject: open_media: do not show failed to download media --- open_media.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open_media.py b/open_media.py index 6328b16..588dc99 100755 --- a/open_media.py +++ b/open_media.py @@ -51,7 +51,7 @@ def main(): filtered_downloaded_list = [] for item in downloaded_list: media_path = os.path.join(download_dir, item) - if os.path.exists(media_path) and not os.path.exists(os.path.join(media_path, ".in_progress")): + if os.path.exists(media_path) and not os.path.exists(os.path.join(media_path, ".in_progress")) and (os.path.isfile(media_path) or (os.path.isdir(media_path) and os.path.exists(os.path.join(media_path, ".finished")))): filtered_downloaded_list.append(item) downloaded_list = filtered_downloaded_list -- cgit v1.2.3