aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-26 19:06:12 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-26 19:06:12 +0200
commit2ea39b359ac53912c7a1c748e2f04aa1a6336f1f (patch)
tree27d366906d53eb6661b83ab09a4a4a440e809a03
parent0c49bfeeefc0b63c2a486948460435c66a36faf9 (diff)
misc, dont show notification for too long
-rwxr-xr-xautomediabin116640 -> 116640 bytes
-rwxr-xr-xopen_media.py2
-rwxr-xr-xread_manga.py2
-rw-r--r--src/html.c4
-rw-r--r--src/main.c4
5 files changed, 7 insertions, 5 deletions
diff --git a/automedia b/automedia
index 3885e0d..cf67880 100755
--- a/automedia
+++ b/automedia
Binary files differ
diff --git a/open_media.py b/open_media.py
index 2d333a1..a432c73 100755
--- a/open_media.py
+++ b/open_media.py
@@ -82,7 +82,7 @@ def main():
files.append(filename)
files = sorted(files, key=sort_images)
- process = subprocess.Popen(["sxiv", "-i", "-f"], stdin=subprocess.PIPE)
+ process = subprocess.Popen(["sxiv", "-a", "-i", "-f"], stdin=subprocess.PIPE)
files_fullpath = []
for filename in files:
files_fullpath.append(os.path.join(media_path, filename))
diff --git a/read_manga.py b/read_manga.py
index f6f2dc7..4ad25c7 100755
--- a/read_manga.py
+++ b/read_manga.py
@@ -77,5 +77,5 @@ for chapter in chapters_by_oldest[start_index:]:
images_str.append(os.path.join(image_dir, image))
index += 1
-process = subprocess.Popen(["sxiv", "-i", "-f"], stdin=subprocess.PIPE)
+process = subprocess.Popen(["sxiv", "-a", "-i", "-f"], stdin=subprocess.PIPE)
process.communicate("\n".join(images_str).encode())
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,
diff --git a/src/main.c b/src/main.c
index b210b71..7a1e68e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -481,7 +481,7 @@ static void torrent_list_check_new_downloads_callback(int id, const char *name,
if(is_finished) {
if(id < unfinished_torrents->size && unfinished_torrents->items[id] == 1) {
unfinished_torrents->items[id] = 0;
- const char *notify_args[] = { "notify-send", "-u", "normal", "--", "Download finished", name, NULL };
+ const char *notify_args[] = { "notify-send", "-u", "normal", "-t", "10000", "--", "Download finished", name, NULL };
program_exec(notify_args, NULL, NULL);
}
} else {
@@ -720,7 +720,7 @@ static void command_cleanup(int argc, char **argv, const char *rss_config_dir, c
}
for(;;) {
- fprintf(stderr, "==> Media to stop tracking: (in number range, eg: 10, \"1-3\")\n");
+ fprintf(stderr, "==> Media to stop tracking: (eg: 10, 1-3)\n");
fprintf(stderr, "==> ");
fflush(stderr);