diff options
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | automedia | bin | 124936 -> 124936 bytes | |||
-rw-r--r-- | src/main.c | 7 | ||||
-rwxr-xr-x | tools/list-by-updated.sh (renamed from list-by-updated.sh) | 0 | ||||
-rwxr-xr-x | tools/list-missing-unwatched.py (renamed from list-missing-unwatched.py) | 0 | ||||
-rwxr-xr-x | tools/list-unwatched.py (renamed from list-unwatched.py) | 0 | ||||
-rwxr-xr-x | tools/open_media.py (renamed from open_media.py) | 0 | ||||
-rwxr-xr-x | tools/track.py (renamed from track.py) | 0 |
8 files changed, 5 insertions, 4 deletions
@@ -19,7 +19,7 @@ If `$HOME/.config/automedia/download_finished.sh` exists then it's called when a curl, transmission-cli, notify-send (optional) ## Python 3 lxml, requests, pure_protobuf (optional, used with mangaplus.shueisha.co.jp) -# Requirements when using open_media.py +# Requirements when using tools/open_media.py ## System dmenu, sxiv (for manga), mpv (for anime) # Important Binary files differ@@ -645,7 +645,7 @@ static void command_sync(int argc, char **argv, char *rss_config_dir, char *html } fprintf(stderr, "Overwriting existing %s\n", automedia_pid_path); - remove(automedia_pid_path); + unlink(automedia_pid_path); pid_file = open(automedia_pid_path, O_CREAT | O_EXCL | O_SYNC | O_RDWR, 0666); } @@ -655,20 +655,21 @@ static void command_sync(int argc, char **argv, char *rss_config_dir, char *html } signal(SIGINT, automedia_pid_signal_handler); + signal(SIGTERM, automedia_pid_signal_handler); char process_pid_str[32]; snprintf(process_pid_str, sizeof(process_pid_str), "%d", getpid()); int process_pid_str_len = strlen(process_pid_str); if(write(pid_file, process_pid_str, process_pid_str_len) != process_pid_str_len) { fprintf(stderr, "Failed to write pid to %s\n", automedia_pid_path); - remove(automedia_pid_path); + unlink(automedia_pid_path); exit(1); } close(pid_file); const int sync_rate_sec = 15 * 60; /* every 15 min */ sync_rss_html(rss_config_dir, html_config_dir, program_dir, download_dir, sync_rate_sec); - remove(automedia_pid_path); + unlink(automedia_pid_path); } static void command_downloaded(int argc, char **argv, const char *rss_config_dir, const char *html_config_dir) { diff --git a/list-by-updated.sh b/tools/list-by-updated.sh index 61b9a0e..61b9a0e 100755 --- a/list-by-updated.sh +++ b/tools/list-by-updated.sh diff --git a/list-missing-unwatched.py b/tools/list-missing-unwatched.py index 980c500..980c500 100755 --- a/list-missing-unwatched.py +++ b/tools/list-missing-unwatched.py diff --git a/list-unwatched.py b/tools/list-unwatched.py index 874df7b..874df7b 100755 --- a/list-unwatched.py +++ b/tools/list-unwatched.py diff --git a/open_media.py b/tools/open_media.py index 66d8ed7..66d8ed7 100755 --- a/open_media.py +++ b/tools/open_media.py diff --git a/track.py b/tools/track.py index d56d8b3..d56d8b3 100755 --- a/track.py +++ b/tools/track.py |