mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-02 16:00:01 -08:00
feat: make plyer an optional dependency
This commit is contained in:
@@ -37,8 +37,13 @@ def exit_app(exit_code=0, *args):
|
||||
|
||||
console = Console()
|
||||
if not console.is_terminal:
|
||||
from plyer import notification
|
||||
|
||||
try:
|
||||
from plyer import notification
|
||||
except ImportError:
|
||||
print(
|
||||
"Plyer is not installed; install it for desktop notifications to be enabled"
|
||||
)
|
||||
exit(1)
|
||||
notification.notify(
|
||||
app_name=APP_NAME,
|
||||
app_icon=ICON_PATH,
|
||||
|
||||
Reference in New Issue
Block a user