From 7669127826c4a6cd6337203346d3262db00fa04d Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Sun, 28 Apr 2024 14:00:54 +0400 Subject: [PATCH] Fix id3pp: try..catch for lyrics, file.save() --- backend/id3pp.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/id3pp.py b/backend/id3pp.py index e407dbd..f6c1d97 100644 --- a/backend/id3pp.py +++ b/backend/id3pp.py @@ -58,7 +58,12 @@ class ID3TagsPP(PostProcessor): if 'track_number' in information: file['TRCK'] = id3.TRCK(encoding=ENC_UTF8, text=str(information['track_number'])) - lyr_url = genius.search(title, artist) - file['USLT'] = id3.USLT(encoding=ENC_UTF8, text=genius.parse(lyr_url)) + try: + lyr_url = genius.search(title, artist) + file['USLT'] = id3.USLT(encoding=ENC_UTF8, text=genius.parse(lyr_url)) + except: + pass + + file.save() return [], information