Skip to content

Fix/missing artist parsing - #411

Merged
tehkillerbee merged 2 commits into
mainfrom
fix/missing-artist-parsing
Oct 13, 2026
Merged

tehkillerbee merged 2 commits into
mainfrom
fix/missing-artist-parsing

Conversation

@tehkillerbee

Copy link
Copy Markdown
Collaborator
  • Bugfix: Parsing tracks and albums no longer fails when TIDAL returns no or empty artist information - be0ca6e
  • Parsed Track flags (pay_to_stream, premium_streaming_only, editable, upload, spotlighted) are now False instead of None when TIDAL omits them, and url is an empty string - 64beaf9

Media.parse() and Album.parse() read json["artists"] and fell back to
artists[0] when there was no "artist" field. A track or album with an
empty or missing artists list (seen with tracks that are no longer
available) therefore failed with IndexError or KeyError, and a JSON null
"artist" with TypeError. One such item made a whole playlist or album
listing fail.

An item without any artist information now parses with artist = None
(the attribute is already Optional) and artists = []. A null "artist" is
treated as missing. Album.parse() keeps the artist it was given when the
JSON has no artist information; otherwise its precedence is unchanged.

Track flags missing from the JSON (payToStream, premiumStreamingOnly,
editable, upload, spotlighted, url) now get the False/"" defaults the
class declares instead of None, and copyright falls back to "" so
unavailable tracks no longer expose a value that contradicts its type.
@tehkillerbee tehkillerbee self-assigned this Oct 13, 2026
@tehkillerbee
tehkillerbee merged commit c5a5daf into main Oct 13, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant