-
Notifications
You must be signed in to change notification settings - Fork 125
fix: Handle missing track metadata tags in parse_track #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Handle missing track metadata tags in parse_track #382
Conversation
|
I encountered the same error when I tried to list the tracks in a playlist. It breaks most operations. I think it should be fixed as soon as possible @tehkillerbee |
tehkillerbee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
It would be nice with some examples of tracks/playlists where this occurs.. Anyways, LGTM merged now. Will update the latest python-tidal release asap. |
|
I realized that my playlist has a track named "Unavailable", and it was the problem. Can you check your playlist too? @blacklight By the way, I tried your changes on my local, but I faced another error for this "Unavailable" track from the get method you added. I don't know how it's added to my playlist, here is the "Unavailable" track:
|
|
I suggest you wait before releasing the new version. Maybe @blacklight has the same track as me, and the problem will be solved by deleting this track without code changes. |
|
I didn't keep track of which specific tracks raised the error, but the pattern I spotted was indeed with "Unavailable" tracks (in my case they were tracks removed from Tidal that were still in my playlist, hence breaking the metadata parsing). |
Yes, Ive also seen some strange behaviour before with tracks / albums /artists that has been removed after they've been added to favourites. That can sometimes give some unexpected behaviour from tidalapi. Generally, "Unavailable" tracks should be handled in a different way instead of fixing some fields that are missing, as done in this PR. I would suggest skipping them from the playlist, as they can usually not be parsed / played back anyways. |
In my case, your changes didn't solve the error. I had to delete "Unavailable" track from my playlist.
Makes sense to me, this way will be more wise. |

I'm not sure if this is a recent change in the Tidal API, but I could reproduce the error on at least two different devices:
This PR makes
parse_trackmore conservative my handling both missing metadata and missing tags.