Update the notification system

This is to resolve issue #8.
This commit is contained in:
20xd6 2023-09-20 18:48:43 -04:00
parent d6a7b56bcf
commit dc8c561576
2 changed files with 6 additions and 8 deletions

View File

@ -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.")

View File

@ -1,2 +1,2 @@
yt-dlp
plyer
notify-py