From e39c99288341da9aaea399ac7ba8668db89c1054 Mon Sep 17 00:00:00 2001 From: Alpha <43486986+sudoAlphaX@users.noreply.github.com> Date: Sun, 5 Jan 2025 22:04:09 +0530 Subject: [PATCH] refactor!: change notifier timeout config to seconds BREAKING CHANGE: change notification timeout from minutes to seconds in config. --- README.md | 5 +---- fastanime/cli/commands/anilist/notifier.py | 2 +- fastanime/cli/config.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index af37feb..dbeb720 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,6 @@ - ## Installation ![Windows](https://img.shields.io/badge/-Windows_x64-blue.svg?style=for-the-badge&logo=windows) @@ -210,7 +209,6 @@ The only required external dependency, unless you won't be streaming, is [MPV](h - [syncplay](https://syncplay.pl/) to enable watch together. - [feh](https://github.com/derf/feh) used in manga mode - ## Usage The project offers a featureful command-line interface and MPV interface through the use of python-mpv. @@ -773,7 +771,7 @@ rofi_theme_input = rofi_theme_confirm = -notification_duration = 2 +notification_duration = 120 sub_lang = eng @@ -814,7 +812,6 @@ format = best[height<=1080]/bestvideo[height<=1080]+bestaudio/best player = mpv ``` - ## Contributing pr's are highly welcome diff --git a/fastanime/cli/commands/anilist/notifier.py b/fastanime/cli/commands/anilist/notifier.py index 3e5d6d1..1c6edce 100644 --- a/fastanime/cli/commands/anilist/notifier.py +++ b/fastanime/cli/commands/anilist/notifier.py @@ -30,7 +30,7 @@ def notifier(config: "Config"): notified = os.path.join(APP_DATA_DIR, "last_notification.json") anime_image_path = os.path.join(APP_CACHE_DIR, "notification_image") - notification_duration = config.notification_duration * 60 + notification_duration = config.notification_duration notification_image_path = "" if not config.user: diff --git a/fastanime/cli/config.py b/fastanime/cli/config.py index b27731e..bde807b 100644 --- a/fastanime/cli/config.py +++ b/fastanime/cli/config.py @@ -57,7 +57,7 @@ class Config(object): "icons": "false", "image_previews": "True" if S_PLATFORM != "win32" else "False", "normalize_titles": "True", - "notification_duration": "2", + "notification_duration": "120", "max_cache_lifetime": "03:00:00", "per_page": "15", "player": "mpv",