Repository navigation
fix(playlists): show your playlists when adding a device song - #642
Merged
Merged
Conversation
Adding a song played from device storage opened an offline-only sheet: it listed offline playlists and otherwise only offered to create one, so the user's own playlists never appeared, even though PlaylistRepository .addTrack keeps local files in custom playlists (and the host already filtered out YouTube playlists for local files). Every song now gets the same sheet. For a device song it lists the user's playlists plus its offline playlists as a second section; offline adds and create-from-device-song behave exactly as before (addToOfflinePlaylists / createOfflinePlaylistAndAdd), regular adds keep their duplicate check. The separate offline sheet is deleted. Material 3 refresh of the sheet: title with the song as subtitle, a small tonal New playlist button instead of the outlined + icon, flat selectable rows with a tonal selection, section labels when both kinds are shown. Co-Authored-By: Claude Opus 5.5 <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.
Problem
Tapping Add to playlist on a song played from device storage didn't list the user's existing playlists. It opened an offline-only sheet that showed offline playlists or, if there were none, only asked to create a new one.
Cause
AddToPlaylistDialogHostsent every device song (novideoId, local URL) to a separate offline sheet. Regular custom playlists do accept local files (PlaylistRepository.addTrackkeeps them, and the host already hides YouTube playlists for local files), so the user's own playlists were hidden for no reason.Fix
addToOfflinePlaylists, creating from a device song still makes an offline playlist, and regular adds keep their duplicate check.UI (Material 3)
Not built or run locally.
🤖 Generated with Claude Code