Skip to content

Commit

Permalink
Merge pull request #292 from tamland/bugfix/291-bug-playlistsandfavor…
Browse files Browse the repository at this point in the history
…iteplaylists-endpoint-appears-broken

Bugfix/291 bug playlistsandfavoriteplaylists endpoint appears broken
  • Loading branch information
tehkillerbee authored Oct 15, 2024
2 parents 02d39b6 + f233a59 commit 5d14865
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/test_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def validate_stream_manifest(manifest, is_hi_res_lossless: bool = False):
assert manifest.dash_info is None
assert manifest.encryption_key is None
assert manifest.encryption_type == "NONE"
assert manifest.file_extension == AudioExtensions.MP4
assert manifest.file_extension == AudioExtensions.M4A
assert manifest.is_encrypted == False
assert manifest.manifest_mime_type == ManifestMimeType.BTS
assert manifest.mime_type == MimeType.audio_mp4
Expand All @@ -539,7 +539,7 @@ def validate_stream_manifest(manifest, is_hi_res_lossless: bool = False):
assert manifest.dash_info is not None
assert manifest.encryption_key is None
assert manifest.encryption_type == "NONE"
assert manifest.file_extension == AudioExtensions.MP4
assert manifest.file_extension == AudioExtensions.FLAC
assert manifest.is_encrypted == False
assert manifest.manifest_mime_type == ManifestMimeType.MPD
assert manifest.mime_type == MimeType.audio_mp4
Expand Down
1 change: 1 addition & 0 deletions tests/test_playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ def test_playlist_merge(session):
tracks = [track.id for track in playlist.tracks()]
for track in tracks:
assert track in added_items
playlist.delete()


def test_playlist_public_private(session):
Expand Down
1 change: 1 addition & 0 deletions tests/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def test_get_playlist_folders(session):
folder_ids = [folder.id for folder in session.user.playlist_folders()]
assert folder.id in folder_ids
folder.remove()
folder_ids = [folder.id for folder in session.user.playlist_folders()]
assert folder.id not in folder_ids


Expand Down
4 changes: 2 additions & 2 deletions tidalapi/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def public_playlists(
) -> List[Union["Playlist", "UserPlaylist"]]:
"""Get the (public) playlists created by the user.
:param offset: The amount of items you want returned.
:param limit: The index of the first item you want included.
:param offset: The amount of items you want returned.
:return: List of public playlists.
"""
params = {"limit": limit, "offset": offset}
Expand All @@ -209,7 +209,7 @@ def public_playlists(
)

def playlist_and_favorite_playlists(
self, limit: Optional[int] = None, offset: int = 0
self, offset: int = 0, limit: int = 50
) -> List[Union["Playlist", "UserPlaylist"]]:
"""Get the playlists created by the user, and the playlists favorited by the
user. This function is limited to 50 by TIDAL, requiring pagination.
Expand Down

0 comments on commit 5d14865

Please sign in to comment.