Skip to content

fix(playlists): show your playlists when adding a device song - #642

Merged
Pyrexus merged 1 commit into
mainfrom
fix/add-to-playlist-existing
Nov 15, 2026
Merged

Pyrexus merged 1 commit into
mainfrom
fix/add-to-playlist-existing

Conversation

@Pyrexus

@Pyrexus Pyrexus commented Nov 15, 2026

Copy link
Copy Markdown
Member

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

AddToPlaylistDialogHost sent every device song (no videoId, local URL) to a separate offline sheet. Regular custom playlists do accept local files (PlaylistRepository.addTrack keeps them, and the host already hides YouTube playlists for local files), so the user's own playlists were hidden for no reason.

Fix

  • Every song gets the same sheet. For a device song it lists your playlists plus offline playlists as a second section.
  • The logic is the same: offline adds still go through addToOfflinePlaylists, creating from a device song still makes an offline playlist, and regular adds keep their duplicate check.
  • The old offline sheet is removed (it has no callers now).

UI (Material 3)

  • A title with the song as its subtitle, and a small tonal New playlist button.
  • Flat, selectable rows with a tonal selection, section labels when both kinds are shown, and Cancel / Add to N.

Not built or run locally.

🤖 Generated with Claude Code

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>
@Pyrexus
Pyrexus merged commit 8ee29a8 into main Nov 15, 2026
1 check passed
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