Catch for notification
plyer fails on Ubuntu with XFCE
This commit is contained in:
parent
bafe53e3a5
commit
d6a7b56bcf
15
download.py
15
download.py
@ -28,12 +28,15 @@ def get(yt_url):
|
|||||||
|
|
||||||
with yt.YoutubeDL(ytdl_options) as ytdl:
|
with yt.YoutubeDL(ytdl_options) as ytdl:
|
||||||
ytdl.download(yt_url)
|
ytdl.download(yt_url)
|
||||||
notification.notify(
|
try:
|
||||||
title = "yt2mp3",
|
notification.notify(
|
||||||
message = "Download and conversion complete.",
|
title = "yt2mp3",
|
||||||
app_icon = None,
|
message = "Download and conversion complete.",
|
||||||
timeout = 3,
|
app_icon = None,
|
||||||
)
|
timeout = 3,
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
print("Notification failed.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user