Skip to content

Conversation

@nilathedragon
Copy link
Contributor

This PR adds enums for the individual sorting types available per favourite and also implements them for all favourites and playlists.

I was not able to directly test the python code, but I did test the HTTP requests manually. Make Test run had some errors, but seems very unrelated to the changes here so I think we are good.

Failed Tests
================================================================================================================================================ short test summary info =================================================================================================================================================
FAILED tests/test_album.py::test_video_cover - FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'
FAILED tests/test_genres.py::test_get_items - tidalapi.exceptions.ObjectNotFound
FAILED tests/test_media.py::test_track_quality_low96k - tidalapi.exceptions.ObjectNotFound: Album not found
FAILED tests/test_media.py::test_track_quality_low320k - tidalapi.exceptions.ObjectNotFound: Album not found
FAILED tests/test_media.py::test_track_quality_lossless - tidalapi.exceptions.ObjectNotFound: Album not found
FAILED tests/test_media.py::test_video_url - FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'
FAILED tests/test_media.py::test_get_track_radio_limit_default - assert 99 == 100
FAILED tests/test_media.py::test_get_track_radio_limit_100 - assert 99 == 100
FAILED tests/test_mix.py::test_mix - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://api.tidal.com/v1/pages/my_collection_my_mixes<redacted>
FAILED tests/test_page.py::test_get_explore_items - AssertionError: assert 'Featured' == 'Genres'
FAILED tests/test_page.py::test_hires_page - AssertionError: assert 'K-Pop: Headphone Classics' == 'Electronic: ...hone Classics'
FAILED tests/test_page.py::test_for_you - AssertionError: assert 'My Mix 1' == 'My Daily Discovery'
FAILED tests/test_page.py::test_page_links - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://api.tidal.com/v1/pages/mood_love<redacted>
FAILED tests/test_page.py::test_moods - AssertionError: assert 'For DJs' == 'Holidays'
FAILED tests/test_page.py::test_mixes - AssertionError: assert 'My Mix 1' == 'My Daily Discovery'
FAILED tests/test_page.py::test_album_page - requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://api.tidal.com/v1/pages/album<redacted>
FAILED tests/test_playlist.py::test_playlist_add_isrc - AssertionError: assert False
FAILED tests/test_session.py::test_config - AssertionError: assert <VideoQuality.low: 'LOW'> == <VideoQuality.high: 'HIGH'>
FAILED tests/test_session.py::test_video_quality_defaults_to_best - AssertionError: assert <VideoQuality.low: 'LOW'> == 'HIGH'
FAILED tests/test_user.py::test_add_remove_favorite_video - requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.tidal.com/v1/users/184335975/favorites/videos<redacted>
=========================================================================================================================== 20 failed, 118 passed, 7 skipped, 4 warnings in 143.46s (0:02:23) ============================================================================================================================

Closes #212

@tehkillerbee
Copy link
Collaborator

Hello and sorry for the slow review. This is indeed a very useful feature that you have added and something I have been wanting to add for a long time.

I'll try to write some simple tests to verify your additions (and fix the other tests that are now broken again. Thanks for the headsup!)

@tehkillerbee tehkillerbee self-assigned this Jun 10, 2025
@tehkillerbee
Copy link
Collaborator

Not quite done with the tests, but will merge this one now as everything seems to be working as expected 👍

@tehkillerbee tehkillerbee merged commit a9a3454 into EbbLabs:master Jul 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Investigate order, orderDirection in favourites and add ordering to the remaining favourites.

2 participants