tamland / python-tidal

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

Unsupported MIX types #173

Closed tehkillerbee closed 1 year ago

tehkillerbee commented 1 year ago

When browsing my mixes (on a newly created Tidal user), I get the following error. I assume Tidal has added new Mix types, or it only occurs when a new user is created. We should handle this situation gracefully or add the missing MixType.

...
Aug 05 17:39:42 G513QR mopidy[26757]:     return list(map(parse, items))
Aug 05 17:39:42 G513QR mopidy[26757]:   File "/usr/local/lib/python3.10/dist-packages/tidalapi/mix.py", line 109, in parse
Aug 05 17:39:42 G513QR mopidy[26757]:     self.mix_type = MixType(json_obj["mixType"])
Aug 05 17:39:42 G513QR mopidy[26757]:   File "/usr/lib/python3.10/enum.py", line 385, in __call__
Aug 05 17:39:42 G513QR mopidy[26757]:     return cls.__new__(cls, value)
Aug 05 17:39:42 G513QR mopidy[26757]:   File "/usr/lib/python3.10/enum.py", line 710, in __new__
Aug 05 17:39:42 G513QR mopidy[26757]:     raise ve_exc
Aug 05 17:39:42 G513QR mopidy[26757]: ValueError: 'WELCOME_MIX' is not a valid MixType
tehkillerbee commented 1 year ago

Fixed in https://github.com/tamland/python-tidal/pull/174