Handle missing __typename in track data

This commit is contained in:
Rafael Moraes
2026-02-26 14:14:13 -03:00
parent b49c7d6fec
commit f591b46a2a
+1 -1
View File
@@ -46,7 +46,7 @@ class SpotifyInterface:
track_response = await self.base.api.get_track(track_id)
track_data = track_response["data"]["trackUnion"]
if track_data["__typename"] != "Track":
if "__typename" in track_data and track_data["__typename"] != "Track":
raise VotifyMediaNotFoundException(track_id, track_data)
if not track_data["playability"]["playable"]: