add additional lyrics presence check

This commit is contained in:
alacleaker 2024-04-12 07:14:53 -03:00
parent 94cdba313c
commit ccef00e39f

View File

@ -184,7 +184,9 @@ class DownloaderSong:
track_metadata = self.downloader.apple_music_api.get_song(
track_metadata["id"]
)
if track_metadata["relationships"]["lyrics"]["data"]:
if track_metadata["relationships"]["lyrics"]["data"] and track_metadata[
"relationships"
]["lyrics"]["data"][0].get("attributes"):
return self._get_lyrics(
track_metadata["relationships"]["lyrics"]["data"][0]["attributes"][
"ttml"