From e7dd457dae8e3d4a929903613d72b24970375832 Mon Sep 17 00:00:00 2001 From: Faizan Asad <57537470+noFAYZ@users.noreply.github.com> Date: Wed, 26 Aug 2026 14:05:42 +0500 Subject: [PATCH] fix: offer shared/collaborative playlists in Add to playlist picker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit isEditable only means "I created this," so a playlist you're a collaborator on (not owner) was filtered out alongside genuinely read-only ones. The actual add call has no ownership gate of its own — it just asks YouTube and reports a real error if it fails — so let it be the authority instead of guessing client-side. Closes #73 --- src/ui/components/TrackContextMenu.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/components/TrackContextMenu.tsx b/src/ui/components/TrackContextMenu.tsx index 410b0b34..996fe5cd 100644 --- a/src/ui/components/TrackContextMenu.tsx +++ b/src/ui/components/TrackContextMenu.tsx @@ -116,12 +116,18 @@ export function TrackContextMenuProvider({ * Local playlists were missing entirely — they never appear in `library.playlists`, so the * picker only ever offered YouTube ones. They are only a valid target for a song that has a * file on disk, since a local playlist is a list of paths. + * + * `isEditable` is not filtered on here: it only tells us whether *we* created the playlist, + * not whether we're allowed to add to it — a playlist someone else shared as a collaborator + * fails that check too, and used to disappear from this list along with true read-only ones. + * The actual add call has no such gate; it just asks YouTube and surfaces a real error if the + * playlist turns out not to be writable, which is the only place that answer is authoritative. */ const playlists = useMemo(() => { const seen = new Set(); const candidates: Playlist[] = []; for (const playlist of [...(libraryState.library?.playlists ?? []), ...localPlaylists]) { - if (playlist.isEditable === false || seen.has(playlist.id)) continue; + if (seen.has(playlist.id)) continue; if (isLocalPlaylist(playlist) && track?.source !== "local") continue; seen.add(playlist.id); candidates.push(playlist);