mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-12 15:50:01 -08:00
feat(notifications): use seconds instead of minutes
This commit is contained in:
@@ -296,8 +296,7 @@ class DownloadService:
|
|||||||
message=message,
|
message=message,
|
||||||
app_name="Viu",
|
app_name="Viu",
|
||||||
app_icon=app_icon,
|
app_icon=app_icon,
|
||||||
timeout=self.app_config.general.desktop_notification_duration
|
timeout=self.app_config.general.desktop_notification_duration,
|
||||||
* 60,
|
|
||||||
)
|
)
|
||||||
except: # noqa: E722
|
except: # noqa: E722
|
||||||
pass
|
pass
|
||||||
@@ -318,7 +317,7 @@ class DownloadService:
|
|||||||
message=message,
|
message=message,
|
||||||
app_name="Viu",
|
app_name="Viu",
|
||||||
app_icon=app_icon,
|
app_icon=app_icon,
|
||||||
timeout=self.app_config.general.desktop_notification_duration * 60,
|
timeout=self.app_config.general.desktop_notification_duration,
|
||||||
)
|
)
|
||||||
except: # noqa: E722
|
except: # noqa: E722
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class FeedbackService:
|
|||||||
message=message,
|
message=message,
|
||||||
app_name=CLI_NAME,
|
app_name=CLI_NAME,
|
||||||
app_icon=str(ICON_PATH),
|
app_icon=str(ICON_PATH),
|
||||||
timeout=self.app_config.general.desktop_notification_duration * 60,
|
timeout=self.app_config.general.desktop_notification_duration,
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
except: # noqa: E722
|
except: # noqa: E722
|
||||||
@@ -67,7 +67,7 @@ class FeedbackService:
|
|||||||
message=message,
|
message=message,
|
||||||
app_name=CLI_NAME,
|
app_name=CLI_NAME,
|
||||||
app_icon=str(ICON_PATH),
|
app_icon=str(ICON_PATH),
|
||||||
timeout=self.app_config.general.desktop_notification_duration * 60,
|
timeout=self.app_config.general.desktop_notification_duration,
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
except: # noqa: E722
|
except: # noqa: E722
|
||||||
@@ -94,7 +94,7 @@ class FeedbackService:
|
|||||||
message=message,
|
message=message,
|
||||||
app_name=CLI_NAME,
|
app_name=CLI_NAME,
|
||||||
app_icon=str(ICON_PATH),
|
app_icon=str(ICON_PATH),
|
||||||
timeout=self.app_config.general.desktop_notification_duration * 60,
|
timeout=self.app_config.general.desktop_notification_duration,
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
except: # noqa: E722
|
except: # noqa: E722
|
||||||
@@ -120,7 +120,7 @@ class FeedbackService:
|
|||||||
message=message,
|
message=message,
|
||||||
app_name=CLI_NAME,
|
app_name=CLI_NAME,
|
||||||
app_icon=str(ICON_PATH),
|
app_icon=str(ICON_PATH),
|
||||||
timeout=self.app_config.general.desktop_notification_duration * 60,
|
timeout=self.app_config.general.desktop_notification_duration,
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
except: # noqa: E722
|
except: # noqa: E722
|
||||||
@@ -176,7 +176,7 @@ class FeedbackService:
|
|||||||
message="No current way to display info in rofi, use fzf and the terminal instead",
|
message="No current way to display info in rofi, use fzf and the terminal instead",
|
||||||
app_name=CLI_NAME,
|
app_name=CLI_NAME,
|
||||||
app_icon=str(ICON_PATH),
|
app_icon=str(ICON_PATH),
|
||||||
timeout=self.app_config.general.desktop_notification_duration * 60,
|
timeout=self.app_config.general.desktop_notification_duration,
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
except: # noqa: E722
|
except: # noqa: E722
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class NotificationService:
|
|||||||
message=message,
|
message=message,
|
||||||
app_name="Viu",
|
app_name="Viu",
|
||||||
app_icon=app_icon, # plyer supports file paths or URLs depending on platform
|
app_icon=app_icon, # plyer supports file paths or URLs depending on platform
|
||||||
timeout=self.app_config.general.desktop_notification_duration * 60,
|
timeout=self.app_config.general.desktop_notification_duration,
|
||||||
)
|
)
|
||||||
logger.info(f"Displayed notification: {message}")
|
logger.info(f"Displayed notification: {message}")
|
||||||
self._mark_seen(
|
self._mark_seen(
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ GENERAL_PYGMENT_STYLE = "github-dark"
|
|||||||
GENERAL_PREFERRED_SPINNER = "smiley"
|
GENERAL_PREFERRED_SPINNER = "smiley"
|
||||||
GENERAL_API_CLIENT = "anilist"
|
GENERAL_API_CLIENT = "anilist"
|
||||||
GENERAL_PREFERRED_TRACKER = "local"
|
GENERAL_PREFERRED_TRACKER = "local"
|
||||||
GENERAL_DESKTOP_NOTIFICATION_DURATION = 5
|
GENERAL_DESKTOP_NOTIFICATION_DURATION = 5 * 60
|
||||||
GENERAL_PROVIDER = "allanime"
|
GENERAL_PROVIDER = "allanime"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user