mirror of
https://github.com/glomatico/votify.git
synced 2026-10-10 01:42:32 +02:00
Handle missing __typename in track data
This commit is contained in:
@@ -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"]:
|
||||
|
||||
Reference in New Issue
Block a user