From 356ba658cee53c6d04d5f3460beaad17c86fc6c6 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Tue, 21 May 2024 13:37:26 +0200 Subject: [PATCH] fix: lyrics enpoint could crash the whole program --- music_kraken/pages/youtube_music/youtube_music.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/music_kraken/pages/youtube_music/youtube_music.py b/music_kraken/pages/youtube_music/youtube_music.py index 9dfc44f..3dc8fc9 100644 --- a/music_kraken/pages/youtube_music/youtube_music.py +++ b/music_kraken/pages/youtube_music/youtube_music.py @@ -589,6 +589,8 @@ class YoutubeMusic(SuperYouTube): }, name=f"fetch_song_lyrics_{video_id}.json" ) + if r is None: + return None dump_to_file(f"fetch_song_lyrics_{video_id}.json", r.text, is_json=True, exit_after_dump=False)