diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-26 19:06:12 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-26 19:06:12 +0200 |
commit | 2ea39b359ac53912c7a1c748e2f04aa1a6336f1f (patch) | |
tree | 27d366906d53eb6661b83ab09a4a4a440e809a03 | |
parent | 0c49bfeeefc0b63c2a486948460435c66a36faf9 (diff) |
misc, dont show notification for too long
-rwxr-xr-x | automedia | bin | 116640 -> 116640 bytes | |||
-rwxr-xr-x | open_media.py | 2 | ||||
-rwxr-xr-x | read_manga.py | 2 | ||||
-rw-r--r-- | src/html.c | 4 | ||||
-rw-r--r-- | src/main.c | 4 |
5 files changed, 7 insertions, 5 deletions
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()) @@ -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, @@ -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); |