Skip to content

Jump to context from the context URI when the item is missing or the native context is stale #513

Description

@LargeModGames

Is your feature request related to a problem? Please describe.

The jump-to-context key (o by default) opens the album, artist or playlist that the playing Spotify track came from. Two cases still open nothing useful:

  1. The playback context has no item. Spotify reports this while an ad plays on a free account, or on a restricted device. A Playlist context still opens (it is read from the context URI), but an Album or Artist context ends in "Nothing is playing", because those two paths resolve the album or artist from the playing item, not from the context URI. Before fix(app): resolve the playing item through the owner #511 the same two cases were silent no-ops.
  2. Under native streaming with a client-side shuffle session or a direct URI-list load, the cached context's context field is None or a stale leftover from an earlier session: the poll skips the wholesale write while the native metadata is authoritative, and the shuffle start never sets it. o then does nothing, or opens the context of a previous session.

Describe the solution you'd like

Resolve the Album and Artist arms of jump-to-context from the context URI when the playing item is missing: parse the album id from a spotify:album: URI and dispatch the album fetch; for spotify:artist: fetch the artist by id (the artist screen needs a name, so the artist page must accept a missing name or fetch it). For the native case, keep the context URI the native player was started from (the parked start request or the shuffle session carry it) and prefer it over the cached Web API context while native playback is authoritative.

Describe alternatives you've considered

Leave the message as it is. The key already says why it did nothing, and both cases are rare. The stale native context is the more misleading of the two because it opens the wrong page.

Additional context

Found while resolving the playing item through the playback owner in #511; noted there as a follow-up.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions