tamland / python-tidal

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

[Question] session.user.favorites.tracks -> track.id is int instead of str? #260

Closed GioF71 closed 2 weeks ago

GioF71 commented 5 months ago

Hello, while implementing a feature which allows the user to add/remove a single track to/from the favorites in my tidal plugin for upmpdcli, I struggled to verify whether a track was actually in favorites or not. After adding a few debug information in the log (unfortunately debugging the plugin is almost impossible AFAIK), I ended up finding that the field "id" of a Track coming from session.user.favorites.tracks is of type int while I assumed it would be of type str. After that, I have been able to implement the functionality correctly, so I am out of trouble already.

It looks to me that generally those id fields should be of type str, am I wrong?

Thank you

tehkillerbee commented 4 months ago

Yes, also related to this issue. It seems the id usage is not consistent. Generally, it is assumed that a str is used throughout tidalapi.

https://github.com/tamland/python-tidal/issues/227

GioF71 commented 4 months ago

Thank you!