-
Notifications
You must be signed in to change notification settings - Fork 111
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
Revert to using enums for relevant classses (Quality etc) #243
Comments
Main reason was to avoid needing to call .value to access Enum members, as we usually use their string value anyways. |
This is is really too bad! Since this project is mainly used as a library by other projects, it makes it really hard to iterate through these "constants". For example: https://github.com/exislow/tidal-dl-ng/blob/e1dfc9ae0b86601e950387882533ab7ea6684f22/tidal_dl_ng/gui.py#L175 I cannot do this anymore to simply populate the GUI with the available quality settings. And I don't see how I can solve this easily not re-assigning all former Enum values. Would it be possible, if you at least use |
IMO, it shouldn't be too hard to iterate over the Quality member variables but I see it adds extra work for the libraries that requires this. Besides, the member variables are not immutable, which is probably not the best idea. Since we do not have
Then we avoid calling .value whenever the string value is needed, which is usually the case internally in tidalapi. |
I actually see no pain in using |
Do you like me to get you an PR on this for the upcoming release? |
I haven't had much time due to other commitments, sorry, so I have not had time to look at this yet. It would be great if you have the time, thanks. |
I got you a PR: #248 |
Thanks for mergin! Have you already a date for the next |
@exislow I will try to see if I can get next release ready by the end of the week, at least with the changes from the latest few PRs. |
Thanks for the new release v0.7.5. I was wondering what, the reason is for the enum cleanups, starting here? https://github.com/tamland/python-tidal/blame/v0.7.5/tidalapi/media.py#L56
Appreciate any information.
The text was updated successfully, but these errors were encountered: