[PR #103] [CLOSED] Fix #102: Add sort order option to library functions #559

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

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/103
Author: @ide-an
Created: 11/11/2020
Status: Closed

Base: masterHead: feature/add_order_to_library_functions


📝 Commits (5)

  • 4a853c6 Support song order for get_library_upload_songs
  • 97a05e1 Extract ordering logic to helper functions
  • 2ee8037 Add ordering test
  • 33c2d45 Add order to library function
  • 4fa981d Remove ordering check in testcases

📊 Changes

4 files changed (+97 additions, -7 deletions)

View changed files

📝 tests/test.py (+43 -0)
📝 ytmusicapi/helpers.py (+16 -0)
📝 ytmusicapi/mixins/library.py (+23 -4)
📝 ytmusicapi/mixins/uploads.py (+15 -3)

📄 Description

fixes #102
This pullrequest adds order parameter to functions bellow:

  • get_library_songs
  • get_library_albums
  • get_library_artists
  • get_library_subscriptions
  • get_library_upload_songs
  • get_library_upload_albums
  • get_library_upload_artists

order parameter accepts "a_to_z", "z_to_a" or "recently_added", and the function returns response in the specified order.


I once implemented for get_library_playlists too, but I faced a problem and gave up.
When you call get_library_playlists with order parameter, youtube music API returns multiple "New playlist" buttons and causes parse error.


🔄 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/103 **Author:** [@ide-an](https://github.com/ide-an) **Created:** 11/11/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/add_order_to_library_functions` --- ### 📝 Commits (5) - [`4a853c6`](https://github.com/sigma67/ytmusicapi/commit/4a853c6555621bc7c2a323bfff4b98d2a2823f3b) Support song order for get_library_upload_songs - [`97a05e1`](https://github.com/sigma67/ytmusicapi/commit/97a05e1af5d759d062c0861148b7b50145a3e7f1) Extract ordering logic to helper functions - [`2ee8037`](https://github.com/sigma67/ytmusicapi/commit/2ee8037cd145296a35521f234164b3981652dc2d) Add ordering test - [`33c2d45`](https://github.com/sigma67/ytmusicapi/commit/33c2d452c92acdf9600453175a4ad20fd9147788) Add order to library function - [`4fa981d`](https://github.com/sigma67/ytmusicapi/commit/4fa981d5793f4a387a6b7adc3efbbcf29dbb3937) Remove ordering check in testcases ### 📊 Changes **4 files changed** (+97 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `tests/test.py` (+43 -0) 📝 `ytmusicapi/helpers.py` (+16 -0) 📝 `ytmusicapi/mixins/library.py` (+23 -4) 📝 `ytmusicapi/mixins/uploads.py` (+15 -3) </details> ### 📄 Description fixes #102 This pullrequest adds `order` parameter to functions bellow: * `get_library_songs` * `get_library_albums` * `get_library_artists` * `get_library_subscriptions` * `get_library_upload_songs` * `get_library_upload_albums` * `get_library_upload_artists` `order` parameter accepts `"a_to_z"`, `"z_to_a"` or `"recently_added"`, and the function returns response in the specified order. ---- I once implemented for `get_library_playlists` too, but I faced a problem and gave up. When you call `get_library_playlists` with `order` parameter, youtube music API returns *multiple "New playlist" buttons* and causes parse error. --- <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:29 +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#559
No description provided.