From d6a7b56bcf2439cfe0e9ab9e4363dcd663c8083d Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Fri, 15 Sep 2023 09:52:20 -0400 Subject: [PATCH] Catch for notification plyer fails on Ubuntu with XFCE --- download.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/download.py b/download.py index f94b43e..981edda 100644 --- a/download.py +++ b/download.py @@ -28,12 +28,15 @@ def get(yt_url): with yt.YoutubeDL(ytdl_options) as ytdl: ytdl.download(yt_url) - notification.notify( - title = "yt2mp3", - message = "Download and conversion complete.", - app_icon = None, - timeout = 3, - ) + try: + notification.notify( + title = "yt2mp3", + message = "Download and conversion complete.", + app_icon = None, + timeout = 3, + ) + except: + print("Notification failed.")