[PR #630] [MERGED] get_playlist: fix artists for unnoficial videos (#627) #681

Closed
opened 2026-02-27 23:01:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/630
Author: @czifumasa
Created: 7/20/2024
Status: Merged
Merged: 7/23/2024
Merged by: @sigma67

Base: mainHead: fix_unnoficial_videos_artists


📝 Commits (5)

  • 3208ca9 get_playlist: fix artists for unnoficial videos (#627)
  • bb1b731 tests for tracks in collaborative playlists
  • fb8c60c library uploads: fix broken index after downloads rollout
  • 26365ee fix test broken by added podcasts on oasis page
  • 6af4d94 get_podcast: fix edge case when first subtitle is missing

📊 Changes

7 files changed (+40 additions, -18 deletions)

View changed files

tests/data/2024_07_get_playlist_collaborative.json (+1 -0)
📝 tests/mixins/test_browsing.py (+7 -1)
📝 tests/mixins/test_playlists.py (+14 -2)
📝 ytmusicapi/navigation.py (+1 -0)
📝 ytmusicapi/parsers/library.py (+1 -1)
📝 ytmusicapi/parsers/playlists.py (+9 -6)
📝 ytmusicapi/parsers/podcasts.py (+7 -8)

📄 Description

Fix for #627.

In the scope of this PR the new logic has been removed for albums. So for albums flexColumns are hardcoded and for playlist they are still resolved using navigationEndpoints. There are border cases with columns without navigationEndpoint, where I have to guess their meaning. Those cases are different for albums and for playlists, so I cannot use the same logic for both methods. Albums always have the same order of flexColumns, so dynamic resolving is not needed there.

Now it's safe to assume that first column without navigationEndpoint is an artist column.

Additionally I added some tests for get_playlist. I prepared json for collaborative playlist with all types of tracks that has been problematic in the recent days:

  • regular song
  • uploaded song
  • unofficial video
  • podcast episode

Asserts will check if all those tracks have title and artist and if there is album for regular songs. I added the same asserts for already existing tests with mocked jsons in get_playlist and get_album.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigma67/ytmusicapi/pull/630 **Author:** [@czifumasa](https://github.com/czifumasa) **Created:** 7/20/2024 **Status:** ✅ Merged **Merged:** 7/23/2024 **Merged by:** [@sigma67](https://github.com/sigma67) **Base:** `main` ← **Head:** `fix_unnoficial_videos_artists` --- ### 📝 Commits (5) - [`3208ca9`](https://github.com/sigma67/ytmusicapi/commit/3208ca9f9132171872168a4cb9b6e6ac40c1fd82) get_playlist: fix artists for unnoficial videos (#627) - [`bb1b731`](https://github.com/sigma67/ytmusicapi/commit/bb1b731285f10aca3053bd05f8313f3fa6fd6970) tests for tracks in collaborative playlists - [`fb8c60c`](https://github.com/sigma67/ytmusicapi/commit/fb8c60cafb21461e1996c351569ef07d313e48e6) library uploads: fix broken index after downloads rollout - [`26365ee`](https://github.com/sigma67/ytmusicapi/commit/26365ee56aadb74f03979aaa9901f37655e71cee) fix test broken by added podcasts on oasis page - [`6af4d94`](https://github.com/sigma67/ytmusicapi/commit/6af4d947216db5d5f68574b1f89de07ba1ca7341) get_podcast: fix edge case when first subtitle is missing ### 📊 Changes **7 files changed** (+40 additions, -18 deletions) <details> <summary>View changed files</summary> ➕ `tests/data/2024_07_get_playlist_collaborative.json` (+1 -0) 📝 `tests/mixins/test_browsing.py` (+7 -1) 📝 `tests/mixins/test_playlists.py` (+14 -2) 📝 `ytmusicapi/navigation.py` (+1 -0) 📝 `ytmusicapi/parsers/library.py` (+1 -1) 📝 `ytmusicapi/parsers/playlists.py` (+9 -6) 📝 `ytmusicapi/parsers/podcasts.py` (+7 -8) </details> ### 📄 Description Fix for #627. In the scope of this PR the new logic has been removed for albums. So for albums `flexColumns` are hardcoded and for playlist they are still resolved using `navigationEndpoints`. There are border cases with columns without `navigationEndpoint`, where I have to guess their meaning. Those cases are different for albums and for playlists, so I cannot use the same logic for both methods. Albums always have the same order of `flexColumns`, so dynamic resolving is not needed there. Now it's safe to assume that first column without `navigationEndpoint` is an artist column. Additionally I added some tests for `get_playlist`. I prepared json for collaborative playlist with all types of tracks that has been problematic in the recent days: - regular song - uploaded song - unofficial video - podcast episode Asserts will check if all those tracks have title and artist and if there is album for regular songs. I added the same asserts for already existing tests with mocked jsons in `get_playlist` and `get_album`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 23:01:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#681
No description provided.