sigma67 / ytmusicapi

Unofficial API for YouTube Music
https://ytmusicapi.readthedocs.io
MIT License
1.59k stars 182 forks source link

get_playlist: title, artists and album are correctly resolved in collaborative playlists (#603) #612

Closed czifumasa closed 1 day ago

czifumasa commented 5 days ago

Fixed invalid playlist item info for collaborative playlists from #603 issue. Instead of hardcoded indexes for flexColumns, now they are resolved using their navigationEndpoint with following logic:

Additional checks:

Unavailable songs do not have navigationEndpoints so hardcoded indexes are still used. Collaborative user is not listed for unavailable song, so it should not be a problem.

sigma67 commented 2 days ago

Could you please add appropriate tests that fail without your changes and pass with them?

codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.53%. Comparing base (05cb3ca) to head (4207444).

Files Patch % Lines
ytmusicapi/parsers/playlists.py 92.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #612 +/- ## ========================================== + Coverage 93.44% 93.53% +0.09% ========================================== Files 36 36 Lines 2211 2211 ========================================== + Hits 2066 2068 +2 + Misses 145 143 -2 ``` | [Flag](https://app.codecov.io/gh/sigma67/ytmusicapi/pull/612/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigma67) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/sigma67/ytmusicapi/pull/612/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigma67) | `93.53% <92.00%> (+0.09%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sigma67#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.