Implement a dedicated artist picker bottom sheet and enhance artist i…#1613
Conversation
…mage prefetching
- **MusicRepository**:
- Implement `missingImageCandidates` helper to identify artists needing image metadata.
- Update `getArtistsForSong` to trigger asynchronous image prefetching for artists associated with the current track.
- Refactor `getArtists` to use the new prefetch candidate logic.
- **PlayerArtistPickerBottomSheet**:
- Create a new component to display a rich list of artists for the current song.
- Feature distinct visual styles for the primary artist versus featured/shortcut artists.
- Include artist avatars with placeholder support and smooth corner shapes.
- **FullPlayerContent**:
- Replace the basic `ModalBottomSheet` with the new `PlayerArtistPickerBottomSheet`.
- Update seek bar time labels with semi-bold font weight for improved legibility.
- **Resources**:
- Add string resources for artist picker titles, labels, and count formatting (English and Spanish).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39a27b013a
ℹ️ 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".
| currentSongArtistPrefetchJob?.cancel() | ||
| currentSongArtistPrefetchJob = repositoryScope.launch { | ||
| artistImageRepository.prefetchArtistImages(missingImages) |
There was a problem hiding this comment.
Avoid canceling song-artist prefetch on each Room emission
Canceling and recreating currentSongArtistPrefetchJob for every getArtistsForSong emission causes in-flight artist fetches to be canceled as soon as one artist image update re-triggers the query; in this codebase, those cancellations are handled by ArtistImageRepository.fetchAndCacheArtistImage's broad catch (Exception) path (which records the artist in failedFetches), so remaining artists can be permanently skipped for the session. This is reproducible for songs with multiple missing artist images where the first successful DB update arrives before the batch completes.
Useful? React with 👍 / 👎.
…mage prefetching
missingImageCandidateshelper to identify artists needing image metadata.getArtistsForSongto trigger asynchronous image prefetching for artists associated with the current track.getArtiststo use the new prefetch candidate logic.ModalBottomSheetwith the newPlayerArtistPickerBottomSheet.