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

enable Playlists for oauth login flow #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jclds139
Copy link

@jclds139 jclds139 commented Feb 9, 2024

Previously user playlists were only loaded for the old cookie authentication. All that needed to be changed was one conditional.

Several places use the `backend.auth` flag to check if we're logged in
or not. Since the API responds simlarly whether using the OAuth login or
the old cookie login, this unifies those checks back under the
`backend.auth` flag.

To simplify setting it the flag, and since `_ytmusicapi_oauth_json` was
only used for one function, I replaced it with direct references to the
original `config['ytmusic']['oauth_json']`.

Finally, checking before reading from `config` avoids crashes when only
one or the other of `auth_json` or `oauth_json` is present in the config
file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant