aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-11-21 16:52:13 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:12:34 +0200
commit8e26354e6d0a597f12682ff54d62e89b2ff9febc (patch)
tree74b31ad140e595efbc455a8ba122cf75978853b0
parent2bfb99f72050d3e88840dfc28355cef5e5c986d9 (diff)
Use correct path for open_media for html (manga)
-rwxr-xr-xautomedia.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/automedia.py b/automedia.py
index 6d463ce..21c4753 100755
--- a/automedia.py
+++ b/automedia.py
@@ -712,7 +712,7 @@ def data_file_get_downloaded(data_filepath):
pass
return downloaded
-def get_downloaded_items(tracked_dir):
+def get_downloaded_items(tracked_dir, is_html):
downloaded_items = []
try:
downloaded_items = []
@@ -721,6 +721,8 @@ def get_downloaded_items(tracked_dir):
downloaded = data_file_get_downloaded(data_filepath)
for item in downloaded:
if item.get("time"):
+ if is_html:
+ item["title"] = os.path.join(name, item["title"])
downloaded_items.append(item)
except OSError:
pass
@@ -728,8 +730,8 @@ def get_downloaded_items(tracked_dir):
def command_downloaded():
downloaded_items = []
- downloaded_items.extend(get_downloaded_items(os.path.join(rss_config_dir, "tracked")))
- downloaded_items.extend(get_downloaded_items(os.path.join(html_config_dir, "tracked")))
+ downloaded_items.extend(get_downloaded_items(os.path.join(rss_config_dir, "tracked"), False))
+ downloaded_items.extend(get_downloaded_items(os.path.join(html_config_dir, "tracked"), True))
downloaded_items = sorted(downloaded_items, key=lambda item: float(item["time"]))
for item in downloaded_items:
print(item["title"])