Skip to content

feat(player): add Go to album to the track menu - #93

Open
mihaimetal wants to merge 2 commits into
NUber-dev:mainfrom
mihaimetal:feature/go-to-album
Open

mihaimetal wants to merge 2 commits into
NUber-dev:mainfrom
mihaimetal:feature/go-to-album

Conversation

@mihaimetal

Copy link
Copy Markdown
Contributor

Add a Go to album item next to Go to artist in the track context menu, the player ⋮ overflow, and the cover menu.

It only shows when the current track belongs to an album (browse id MPREb_…). Opening it navigates to /album/$id. From the floating player it emits nav:album and focuses the main window, same as Go to artist.

Album-page rows already stamp their browse id onto queued tracks. Other play sources often omit it, so we also:

  • read MPREb_… from bylines even without pageType
  • take the id from the row's own InnerTube "Go to album" menu item
  • look up the now-playing video via /next when the queue still has no id

Singles / videos with no album still omit the item.

Show the item when the current track has an album browse id, and keep
that id on queued tracks so the player overflow menu can open /album/$id.
Most play sources never put an album browse id on the queued track, so
the player ⋮ item stayed hidden even for album songs. Read MPREb_ ids
and the row's own Go to album menu, and look the current track up via
/next when the queue still has no id.

This branch has not been deployed

No deployments
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