mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 07:16:00 +03:00
[PR #403] [MERGED] Oauth refresh on request #611
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#611
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/sigma67/ytmusicapi/pull/403
Author: @zeitmeister
Created: 6/19/2023
Status: ✅ Merged
Merged: 7/3/2023
Merged by: @sigma67
Base:
master← Head:oauth-refresh-on-request📝 Commits (10+)
ed6ba7bupdating token on every request if auth is oauth25014ccremove print line09fbf2fheaders only updated if auth is oauthd40f283Merge branch 'sigma67:master' into oauth-refresh-on-requestdbf4f43some refactoringeeef723Merge branch 'oauth-refresh-on-request' of github.com:zeitmeister/ytmusicapi into oauth-refresh-on-requestf754f8bdont know what happened here4a31cf7xMerge branch 'oauth-refresh-on-request' of github.com:zeitmeister/ytmusicapi into oauth-refresh-on-requesta02b86bMerge branch 'sigma67:master' into oauth-refresh-on-request533d5b1check for self.auth📊 Changes
2 files changed (+19 additions, -7 deletions)
View changed files
📝
ytmusicapi/auth/headers.py(+3 -5)📝
ytmusicapi/ytmusic.py(+16 -2)📄 Description
This fix should update so that for every request to ytmusic the code checks if the access token needs refreshing and refreshes it if that's the case.
However, the headers object are updated on every request, regardless if the token needs refreshing or not. This is probably not cpu heavy by any means but should perhaps be looked at in another iteration. or when i have more time...
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.