sigma67 / ytmusicapi

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

track_number fails on disabled tracks #515

Closed jcbirdwell closed 8 months ago

jcbirdwell commented 8 months ago

Describe the bug Calling get_album on an album containing a disabled, but not removed or deleted, track throws a value error. This is the result of the response having all the keys for the index (nav won't return None) but with a blank space value ' ' instead of the actual track number.

To Reproduce get_album('MPREb_YuigcYm2erf')

Additional context Unsure if its a regionally disabled track, but it's reproducible with an unauthorized client with location set to 'US'. Album playlist link for visual context: https://music.youtube.com/playlist?list=OLAK5uy_nQ50qK0OQks_zc_jjn0IvWb7Vg1vo0s5Y