aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-04-26 22:18:59 +0200
committerdec05eba <dec05eba@protonmail.com>2024-04-26 22:18:59 +0200
commit03f477257deb3a1cc4c47fe6d0054867493fb49d (patch)
tree6804e3b34831e7ae0b17db4c2ed175d37071dd0c
parentdf659a0deae1e4a674ea7d17e3c874d4de60f5f9 (diff)
Change notify-send timeout to 3 seconds
-rw-r--r--src/html.c2
-rw-r--r--src/main.c2
-rwxr-xr-xtools/list-missing-unwatched.py2
-rwxr-xr-xtools/list-unwatched.py2
-rwxr-xr-xtools/track.py2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/html.c b/src/html.c
index 2cea600..c0860b5 100644
--- a/src/html.c
+++ b/src/html.c
@@ -426,7 +426,7 @@ 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", "-a", "automedia", "-u", result == 0 ? "normal" : "critical", "-t", "10000", "--", result == 0 ? "Download finished" : "Download failed", notify_msg, NULL };
+ const char *notify_args[] = { "notify-send", "-a", "automedia", "-u", result == 0 ? "normal" : "critical", "-t", "3000", "--", result == 0 ? "Download finished" : "Download failed", notify_msg, NULL };
program_exec(notify_args, NULL, NULL);
if(result != 0)
diff --git a/src/main.c b/src/main.c
index 50e3c1e..a4deda0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -511,7 +511,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", "-a", "automedia", "-t", "10000", "--", "Download finished", name, NULL };
+ const char *notify_args[] = { "notify-send", "-u", "normal", "-a", "automedia", "-t", "3000", "--", "Download finished", name, NULL };
program_exec(notify_args, NULL, NULL);
char item_path[PATH_MAX];
diff --git a/tools/list-missing-unwatched.py b/tools/list-missing-unwatched.py
index 980c500..e529acb 100755
--- a/tools/list-missing-unwatched.py
+++ b/tools/list-missing-unwatched.py
@@ -6,7 +6,7 @@ import sys
def show_notification(title, description, urgency):
print("Notification: title: %s, description: %s" % (title, description))
- process = subprocess.Popen(["notify-send", "-a", "automedia", "-t", "10000", "-u", urgency, "--", title, description])
+ process = subprocess.Popen(["notify-send", "-a", "automedia", "-t", "3000", "-u", urgency, "--", title, description])
stdout, stderr = process.communicate()
return process.returncode == 0
diff --git a/tools/list-unwatched.py b/tools/list-unwatched.py
index 874df7b..9c81c2c 100755
--- a/tools/list-unwatched.py
+++ b/tools/list-unwatched.py
@@ -5,7 +5,7 @@ import subprocess
def show_notification(title, description, urgency):
print("Notification: title: %s, description: %s" % (title, description))
- process = subprocess.Popen(["notify-send", "-a", "automedia", "-t", "10000", "-u", urgency, "--", title, description])
+ process = subprocess.Popen(["notify-send", "-a", "automedia", "-t", "3000", "-u", urgency, "--", title, description])
stdout, stderr = process.communicate()
return process.returncode == 0
diff --git a/tools/track.py b/tools/track.py
index d56d8b3..03a5232 100755
--- a/tools/track.py
+++ b/tools/track.py
@@ -7,7 +7,7 @@ import sys
def show_notification(title, description, urgency):
print("Notification: title: %s, description: %s" % (title, description))
- process = subprocess.Popen(["notify-send", "-a", "automedia", "-t", "10000", "-u", urgency, "--", title, description])
+ process = subprocess.Popen(["notify-send", "-a", "automedia", "-t", "3000", "-u", urgency, "--", title, description])
stdout, stderr = process.communicate()
return process.returncode == 0