[PR #74] [MERGED] Return empty list if no songs are uploaded #552

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

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/74
Author: @apastel
Created: 9/5/2020
Status: Merged
Merged: 9/6/2020
Merged by: @sigma67

Base: masterHead: bugfix/get-upload-songs-throws-err-if-empty


📝 Commits (4)

  • 6644232 Return empty list if 'musicShelfRenderer' not in list of uploaded songs (#71)
  • 07215a6 Add skipped unit tests that would verify no errors are returned when there's 0 uploads
  • 0ec5bc0 Update .gitignore to ignore venv and egg-info
  • d9c8800 Return empty list if 'musicShelfRenderer' not in list of uploaded artists (#71)

📊 Changes

3 files changed (+31 additions, -4 deletions)

View changed files

📝 .gitignore (+3 -1)
📝 tests/test.py (+17 -1)
📝 ytmusicapi/mixins/uploads.py (+11 -2)

📄 Description

fixes #71
Used the same error checking logic as in get_library_upload_albums().

I wanted some unit tests so I created tests that verify an empty list is returned for these functions, But of course they assume that your upload library is empty, so I set them to be skipped. I can delete them if you think they're unnecessary, but I wanted to show that I used them to verify my code.

Updated the .gitignore with a couple standard python ignores that were showing as diffs for me.


🔄 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/74 **Author:** [@apastel](https://github.com/apastel) **Created:** 9/5/2020 **Status:** ✅ Merged **Merged:** 9/6/2020 **Merged by:** [@sigma67](https://github.com/sigma67) **Base:** `master` ← **Head:** `bugfix/get-upload-songs-throws-err-if-empty` --- ### 📝 Commits (4) - [`6644232`](https://github.com/sigma67/ytmusicapi/commit/66442320a1d419f479795041f4d65bab5e0f76b5) Return empty list if 'musicShelfRenderer' not in list of uploaded songs (#71) - [`07215a6`](https://github.com/sigma67/ytmusicapi/commit/07215a6520f6f4d30a87cb68caf63218430e3ed2) Add skipped unit tests that would verify no errors are returned when there's 0 uploads - [`0ec5bc0`](https://github.com/sigma67/ytmusicapi/commit/0ec5bc0a0e1d7cb45126474374e1fa26d33c6776) Update .gitignore to ignore venv and egg-info - [`d9c8800`](https://github.com/sigma67/ytmusicapi/commit/d9c88009d8cfa849004f96d20e58495c06677436) Return empty list if 'musicShelfRenderer' not in list of uploaded artists (#71) ### 📊 Changes **3 files changed** (+31 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -1) 📝 `tests/test.py` (+17 -1) 📝 `ytmusicapi/mixins/uploads.py` (+11 -2) </details> ### 📄 Description fixes #71 Used the same error checking logic as in get_library_upload_albums(). I wanted some unit tests so I created tests that verify an empty list is returned for these functions, But of course they assume that your upload library is empty, so I set them to be skipped. I can delete them if you think they're unnecessary, but I wanted to show that I used them to verify my code. Updated the .gitignore with a couple standard python ignores that were showing as diffs for me. --- <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:27 +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#552
No description provided.