aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-04-05 23:17:55 +0200
committerdec05eba <dec05eba@protonmail.com>2022-04-05 23:17:55 +0200
commit4a777d0b18140211ba9313f31ba6cd05026d0fa0 (patch)
tree6db57d2b017cb8b53a374926992815d0102605d2
parent0e12dd4e395cb4716e81bac41b220a7575397b28 (diff)
No warning if download_finished.sh doesn't exist
-rwxr-xr-xautomediabin124936 -> 124936 bytes
-rw-r--r--src/html.c4
-rw-r--r--src/main.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/automedia b/automedia
index cd345fc..153febf 100755
--- a/automedia
+++ b/automedia
Binary files differ
diff --git a/src/html.c b/src/html.c
index 1bdd3de..e8ddd23 100644
--- a/src/html.c
+++ b/src/html.c
@@ -428,7 +428,9 @@ static int download_html_items_in_reverse(const char *plugin_filepath, Buffer *d
break;
const char *download_finished_args[] = { download_finished_script, "html", item_dir, NULL };
- program_exec(download_finished_args, NULL, NULL);
+ if(file_exists(download_finished_script) == 0)
+ program_exec(download_finished_args, NULL, NULL);
+
fprintf(stderr, "Download finished for html item: %s (title: %s)\n", download_items_it->link, notify_msg);
added_download_items[download_item_index] = download_items_it;
diff --git a/src/main.c b/src/main.c
index 45936a5..a5ab5d9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -510,7 +510,8 @@ static void torrent_list_check_new_downloads_callback(int id, const char *name,
path_join(item_path, components, 2);
const char *download_finished_args[] = { download_finished_script, "rss", item_path, NULL };
- program_exec(download_finished_args, NULL, NULL);
+ if(file_exists(download_finished_script) == 0)
+ program_exec(download_finished_args, NULL, NULL);
}
} else {
if(id >= unfinished_torrents->size) {