contrib: iris-youtube-accounts (Google-login account switcher for Iris)#4
Open
davidj4tech wants to merge 1 commit into
Open
contrib: iris-youtube-accounts (Google-login account switcher for Iris)#4davidj4tech wants to merge 1 commit into
davidj4tech wants to merge 1 commit into
Conversation
Optional add-on, de-personalized from the author's setup, that adds a YouTube
account switcher to Mopidy-Iris's sidebar — a popover to switch accounts + an
"Add account" Google-login button + Remove — backed by this plugin's
/mpv/ytadd|ytcb|ytdel routes.
Ships three adaptable scripts and a README documenting the setup and the three
reusable techniques:
- iris-inject-accounts: inject a native-looking sidebar item + popover into
Iris's served index.html (MutationObserver; no Iris fork).
- iris-inject-sw: make Iris's cache-first service worker self-update so
injected UI changes propagate without a manual cache clear.
- yt-google-add: run the Google login (device flow, or the fully code-free
auth-code/redirect flow with a web client), write an auto-refreshing token
named after the channel, and call a pluggable activate hook.
Config via env (YT_OAUTH_DIR / YT_STATUS_DIR / YT_ACTIVATE_CMD /
YT_PLAYLISTS_DIR / IRIS_YT_PORT). The playlist enumerator (Data API v3
playlists.list?mine=true) is documented as a reference snippet for you to wire
into your own backend.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
contrib/iris-youtube-accounts/— an optional, de-personalized add-on that puts a YouTube account switcher into Mopidy-Iris's sidebar: a popover to switch the active account + an "Add account" Google-login button + Remove, backed by this plugin's/mpv/ytadd|ytcb|ytdelroutes.What's included
ExecStartPre), the request flow, env config, and a reference enumerator snippet.sidebar__menu__item+ popover into Iris's servedindex.htmlvia aMutationObserver(no Iris fork).skipWaiting+ network-first navigation) so injected UI changes propagate without a manual cache clear.YT_ACTIVATE_CMD.Three reusable techniques documented
playlists.list?mine=true) — sidesteps ytmusicapi's InnerTube HTTP 400 for device tokens.tailscale servefor the HTTPS redirect URI.Notes
mopidy_mpv/http.py; these scripts are the front-end + login tool, configurable via env (YT_OAUTH_DIR,YT_STATUS_DIR,YT_ACTIVATE_CMD,YT_PLAYLISTS_DIR,IRIS_YT_PORT).YT_ACTIVATE_CMD) — the README gives a reference Data-API enumerator to adapt.node --check.🤖 Generated with Claude Code