"""Generic playlist and track models. These are intermediate representations of a Spotify source playlist, used by all synchronizes regardless of the target platform. Mirrors GenericPlaylist.cs and GenericTrack.cs from Sony.Filtr.PlaylistSynchronization. """ from dataclasses import dataclass, field from typing import List, Optional @dataclass class GenericTrack: """A single track from the source Spotify playlist.""" name: str artists: List[str] isrc: Optional[str] spotify_uri: str # Populated by DeezerSynchronizer after ISRC→Deezer ID lookup deezer_id: Optional[int] = None @dataclass class GenericPlaylist: """Source playlist fetched from Spotify.""" name: str description: Optional[str] image: Optional[str] tracks: List[GenericTrack] = field(default_factory=list) # The Spotify user ID who owns the playlist (used by Deezer static-playlist detect) user: Optional[str] = None # Human-readable display name of the playlist owner user_name: Optional[str] = None