From dc8c56157680b96d79bba2cf1eff56a065af8cd0 Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Wed, 20 Sep 2023 18:48:43 -0400 Subject: [PATCH] Update the notification system This is to resolve issue #8. --- download.py | 12 +++++------- requierments.txt | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/download.py b/download.py index 981edda..d9244f4 100644 --- a/download.py +++ b/download.py @@ -1,6 +1,6 @@ try: import yt_dlp as yt - from plyer import notification + from notifypy import Notify except: import os script_dir = os.path.dirname(os.path.realpath(__file__)) @@ -29,12 +29,10 @@ def get(yt_url): with yt.YoutubeDL(ytdl_options) as ytdl: ytdl.download(yt_url) try: - notification.notify( - title = "yt2mp3", - message = "Download and conversion complete.", - app_icon = None, - timeout = 3, - ) + notification = Notify() + notification.title = "yt2mp3" + notification.message = "Download and conversion complete." + notification.send() except: print("Notification failed.") diff --git a/requierments.txt b/requierments.txt index 9483d98..0a42c0e 100644 --- a/requierments.txt +++ b/requierments.txt @@ -1,2 +1,2 @@ yt-dlp -plyer \ No newline at end of file +notify-py \ No newline at end of file