Skip to content

Commit

Permalink
Bugfix: Use correct internal type int for relevant IDs (Fixes #260)
Browse files Browse the repository at this point in the history
  • Loading branch information
tehkillerbee committed Sep 10, 2024
1 parent 77fec14 commit 63e579e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tidalapi/album.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Album:
name, cover and video cover. TIDAL does this to reduce the network load.
"""

id: Optional[str] = None
id: Optional[int] = -1
name: Optional[str] = None
cover = None
video_cover = None
Expand Down
2 changes: 1 addition & 1 deletion tidalapi/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


class Artist:
id: Optional[str] = None
id: Optional[int] = -1
name: Optional[str] = None
roles: Optional[List["Role"]] = None
role: Optional["Role"] = None
Expand Down
2 changes: 1 addition & 1 deletion tidalapi/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class Media:
actual media, use the release date of the album.
"""

id: Optional[str] = None
id: Optional[int] = -1
name: Optional[str] = None
duration: Optional[int] = -1
available: bool = True
Expand Down
6 changes: 3 additions & 3 deletions tidalapi/mix.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ class MixV2:
# tehkillerbee: TODO Doesn't look like this is using the v2 endpoint anyways!?

date_added: Optional[datetime] = None
title: str = ""
id: str = ""
title: Optional[str] = None
id: Optional[str] = None
mix_type: Optional[MixType] = None
images: Optional[ImageResponse] = None
detail_images: Optional[ImageResponse] = None
master = False
title_text_info: Optional[TextInfo] = None
sub_title_text_info: Optional[TextInfo] = None
sub_title: str = ""
sub_title: Optional[str] = None
updated: Optional[datetime] = None

def __init__(self, session: Session, mix_id: str):
Expand Down

0 comments on commit 63e579e

Please sign in to comment.