aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-04-24 18:42:09 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:12:34 +0200
commite283281f517ef5993d55e875101a2357fdedeb4a (patch)
tree4cb3d28ec3da5267cce016a4d2ba2b0a255ab5ea
parent930bbe78546adb464cc5a4be274b04497f1fb1fb (diff)
open_media: do not show failed to download media
-rwxr-xr-xopen_media.py2
1 files changed, 1 insertions, 1 deletions
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