Skip to content
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

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

Closed
GioF71 opened this issue May 2, 2024 · 2 comments · Fixed by #280
Closed

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

GioF71 opened this issue May 2, 2024 · 2 comments · Fixed by #280
Assignees
Labels

Comments

@GioF71
Copy link
Contributor

GioF71 commented May 2, 2024

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
Copy link
Collaborator

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.

#227

@GioF71
Copy link
Contributor Author

GioF71 commented May 6, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants