tamland / python-tidal

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

Handle optional user fields gracefully #148

Closed tehkillerbee closed 1 year ago

tehkillerbee commented 1 year ago

Optional/removed fields often breaks tidalapi. We should handle optional/unused fields gracefully

See this issue for more details: https://github.com/tamland/python-tidal/pull/147

2e0byo commented 1 year ago

FWIW I think we should only get the fields we actually use, and then just provide the raw response object to anyone who wants it. Or if we still want to parse, something like:

for k, v in response.items():
   if not hasattr(self, k):
       setattr(self, k, v)

I also suspect these fields are gone for good: not sure what GDPR would say of shipping the user's gender to every device just in order to play music. TBH I was quite surprised to see that field even existed.