From 9e82456caf950cee346b7d601846d22f07c5ebc3 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Tue, 17 Mar 2026 16:02:32 -0700 Subject: [PATCH] Fix album_type field missing from Deezer and Spotify Track dataclasses Both clients have their own Track class separate from iTunes. The album preference commit added album_type/total_tracks to from_*_track() constructors but not to the class definitions, crashing all Deezer and Spotify discovery searches. --- core/deezer_client.py | 2 ++ core/spotify_client.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/deezer_client.py b/core/deezer_client.py index e9cb8806..f7e0b9c8 100644 --- a/core/deezer_client.py +++ b/core/deezer_client.py @@ -58,6 +58,8 @@ class Track: release_date: Optional[str] = None track_number: Optional[int] = None disc_number: Optional[int] = None + album_type: Optional[str] = None + total_tracks: Optional[int] = None @classmethod def from_deezer_track(cls, track_data: Dict[str, Any]) -> 'Track': diff --git a/core/spotify_client.py b/core/spotify_client.py index c0d1f69c..f06ff955 100644 --- a/core/spotify_client.py +++ b/core/spotify_client.py @@ -297,6 +297,8 @@ class Track: external_urls: Optional[Dict[str, str]] = None image_url: Optional[str] = None release_date: Optional[str] = None + album_type: Optional[str] = None + total_tracks: Optional[int] = None @classmethod def from_spotify_track(cls, track_data: Dict[str, Any]) -> 'Track':