From 2ea39b359ac53912c7a1c748e2f04aa1a6336f1f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 26 Apr 2021 19:06:12 +0200 Subject: misc, dont show notification for too long --- src/html.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/html.c') diff --git a/src/html.c b/src/html.c index fc45843..572a396 100644 --- a/src/html.c +++ b/src/html.c @@ -362,11 +362,13 @@ static int download_html_items_in_reverse(const char *plugin_filepath, Buffer *d if(result != 0) fprintf(stderr, "Failed while downloading html, url: %s\n", download_items_it->link); - const char *notify_args[] = { "notify-send", "-u", result == 0 ? "normal" : "critical", "--", result == 0 ? "Download finished" : "Download failed", notify_msg, NULL }; + const char *notify_args[] = { "notify-send", "-u", result == 0 ? "normal" : "critical", "-t", "10000", "--", result == 0 ? "Download finished" : "Download failed", notify_msg, NULL }; program_exec(notify_args, NULL, NULL); if(result != 0) break; + + 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; // TODO: What if the download is so fast two items have the same timestamp? Maybe substract by MAX_UPDATE_ITEMS and then add 1 each loop, -- cgit v1.2.3