tamland / python-tidal

Python API for TIDAL music streaming service
GNU Lesser General Public License v3.0
413 stars 110 forks source link

Missing albumReplayGain dictionary entry causes runtime exception #240

Closed GioF71 closed 8 months ago

GioF71 commented 8 months ago

Hello, using the current master branch (at commit 979e6cca1a96140b135b5b5ed22b0ff40695a36a), if I change you chosen album_id with 249593867, I get an error with the albumReplayGain dictionary entry. Looks like sometimes the information isn't set of course.

Thank you for your attention

tehkillerbee commented 8 months ago

@GioF71 Interesting, nice catch. Looks like this issue only occurs for albums where only SONY360 audio mode is available.

I have made a quickfix but it would be nice to test if this issue also occurs with other audio modes. Have you found any such albums?

GioF71 commented 8 months ago

Well actually that one is on my favorites list, but I didn't even notice that it was encoded that way. I saw there are other two versions of "Facelift". I don't even remember that as a memorable album anyway, but I bought it back in the day, so, I am kind of attached to it.

Sorry, I do not fully understand what do you mean with

it would be nice to test if this issue also occurs with other audio modes

I was using pkce authentication and the subscription is currently hifi plus. Maybe you as me to test the other versions of the same album? If so, sure, I will try tomorrow with the other two versions of the same album.

tehkillerbee commented 8 months ago

The fields are missing for certain albums, eg if they use Sony360 audio mode. But I have changed how these fields are set, so this issue should not occur again.

EDIT: I have not pushed my local changes yet but they will be part of my next PR.

tehkillerbee commented 8 months ago

Fixed in #242