[PR #516] [MERGED] get_album: track_number returns none when track unavailable + test #635

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

📋 Pull Request Information

Original PR: https://github.com/sigma67/ytmusicapi/pull/516
Author: @jcbirdwell
Created: 1/13/2024
Status: Merged
Merged: 1/14/2024
Merged by: @sigma67

Base: mainHead: track_number_fix


📝 Commits (3)

  • 63cdcc1 get_album: track_number returns none when track unavailable + test
  • 0cc590a Update ytmusicapi/parsers/playlists.py
  • ad73362 test_get_album: sans fixtures

📊 Changes

3 files changed (+5 additions, -10 deletions)

View changed files

📝 tests/conftest.py (+0 -6)
📝 tests/mixins/test_browsing.py (+4 -2)
📝 ytmusicapi/parsers/playlists.py (+1 -2)

📄 Description

Simple fix for #515 and adds test case for albums with unavailable tracks.

Issue could alternatively be solved by extending nav's none_if_absent to coerce nullish return values. thoughts?


🔄 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/516 **Author:** [@jcbirdwell](https://github.com/jcbirdwell) **Created:** 1/13/2024 **Status:** ✅ Merged **Merged:** 1/14/2024 **Merged by:** [@sigma67](https://github.com/sigma67) **Base:** `main` ← **Head:** `track_number_fix` --- ### 📝 Commits (3) - [`63cdcc1`](https://github.com/sigma67/ytmusicapi/commit/63cdcc1b288633bf4dedad02b4fccee25318edf6) get_album: track_number returns none when track unavailable + test - [`0cc590a`](https://github.com/sigma67/ytmusicapi/commit/0cc590a27e0a23a8f545b04f7f5f2efeeb0c7b4e) Update ytmusicapi/parsers/playlists.py - [`ad73362`](https://github.com/sigma67/ytmusicapi/commit/ad73362e94ebad914b1cc62fe9a2a0a886167d83) test_get_album: sans fixtures ### 📊 Changes **3 files changed** (+5 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `tests/conftest.py` (+0 -6) 📝 `tests/mixins/test_browsing.py` (+4 -2) 📝 `ytmusicapi/parsers/playlists.py` (+1 -2) </details> ### 📄 Description Simple fix for #515 and adds test case for albums with unavailable tracks. Issue could alternatively be solved by extending nav's none_if_absent to coerce nullish return values. thoughts? --- <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:47 +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#635
No description provided.