Conversation
This comment was marked as outdated.
This comment was marked as outdated.
- add playback-list drill-down on Enter and direct play on P - open favorite artists/albums/playlists in browse views using metadata-aware lookup - harden timeline transition handling with pending/ignore windows to avoid stale echoes - reset playhead state immediately on previous-track command - add regression tests for favorites navigation and timeline behavior
- switch artist/album/playlist playback commands to playbackTriggeredMsg - remove per-view playback message types and duplicate success/error handlers - set immediate status feedback on artist play keypress - add artist browse test coverage for status update behavior
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e14d9e5e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| log.Debug(fmt.Sprintf("Toggling favorite for album: %s (ratingKey: %s)", selected.title, selected.ratingKey)) | ||
| m.lastCommand = fmt.Sprintf("Toggling favorite for %s", selected.title) | ||
|
|
||
| _, cmd := m.addRemoveFavorite(selected.title, selected.ratingKey, "album") |
There was a problem hiding this comment.
Reject favorite toggle on placeholder album rows
While artist albums are loading, the selected row is the placeholder Loading albums... with an empty ratingKey; pressing f still calls addRemoveFavorite with that empty key. This persists an invalid favorite entry and can conflict with other empty-key entries because favorites are keyed by metadata key, so the user can accidentally corrupt their favorites list just by toggling too early.
Useful? React with 👍 / 👎.
| title: item.Name, | ||
| ratingKey: item.MetadataKey, | ||
| }) | ||
| return m.fetchArtistAlbumsCmd(item.MetadataKey) |
There was a problem hiding this comment.
Guard favorite drill-down when metadata key is missing
findFavoriteItem explicitly falls back to name/type for legacy favorites, but openFavoriteItem immediately dispatches fetch commands using item.MetadataKey without checking that it is non-empty. For legacy rows without keys, pressing Enter navigates into drill-down mode and issues requests with an empty key (for example /library/metadata//children), so the new browse flow fails reliably instead of giving a recoverable message.
Useful? React with 👍 / 👎.
Summary
This PR:
What Changed
Plex API client
PlexTrackandPlexTrackContainerXML models.FetchAlbumTracks(serverAddr, albumRatingKey, token).FetchPlaylistTracks(serverAddr, playlistRatingKey, token).FetchArtistAlbums(...)to return actual album results, filter by album type, and sort albums by title.UI state and panel routing
artistAlbumList,trackList.currentArtistKey,currentArtistNamecurrentAlbumKey,currentAlbumNamecurrentPlaylistKey,currentPlaylistNametrackReturnModesuppressTimelineplex-artist-albumsplex-album-tracksplex-playlist-tracksrefreshCurrentPanel()to refresh artist albums, album tracks, and playlist tracks when applicable.New browse flows
internal/ui/plex_artist_album_browse.go:Enter-> view album tracks.P-> play album.f-> toggle favorite.R-> refresh.internal/ui/plex_track_browse.go:Enter-> play selected track.Esc/q-> return to originating panel.Existing browse behavior changes
Enternow opens artist albums.Pplays selected artist.Enternow opens album tracks.Pplays selected album.Enternow opens playlist tracks.Pplays selected playlist.Refreshing playlists....Playback/timeline improvements
beginPlaybackPending(...)beginPlaybackRefresh(...)beginPlaybackRefresh("").User Impact
Enter.Pin artist/album/playlist views.