Skip to content

feat: import custom playlists from Listenbrainz/Apple Music#155

Merged
LumePart merged 14 commits into
LumePart:devfrom
dammitjeff:custom-playlists
Jun 2, 2026
Merged

feat: import custom playlists from Listenbrainz/Apple Music#155
LumePart merged 14 commits into
LumePart:devfrom
dammitjeff:custom-playlists

Conversation

@dammitjeff
Copy link
Copy Markdown
Contributor

@dammitjeff dammitjeff commented May 24, 2026

BIG PR here!! This pr brings the ability to import playlist URL's from ListenBrainz + Apple Music, organized the LB API calls, and a bunch of mini bug fixes in between.

Screenshot_2026-05-23_at_11 49 27_AM
  • ImportModal.jsx: New modal UI that the user interacts with. Users can pick their source for their playlist, and it handles the rest for them.
Screen.Recording.2026-05-23.at.9.52.20.PM.mp4
  • custom_playlists.go: This is the import handler that holds the CustomPlaylist structure, JSON storage, and the four handlers (get, import,refresh,delete). This checks to see if the submitted link is LB or Apple Music URL, writes the cache, and starts downloads for covers and playlist artwork.

Custom playlists are treated just like explo playlists, they use the same env var pattern EXPLO_PLAYLIST_NAME_FLAGS and _SCHEDULE for their cron schedule and run flags. So they're plug and play as far as endpoints and scheduling. Only difference from explo playlists is that these are called through loadCustomTracks instead of discovery.Discover, since they're just a list of songs and dont need to be run through LB.

Custom_playlists also calls util.DownloadFile to cache custom playlist cover arts if they exist, and uploads it to the playlist across all music players! Really proud about getting this working :)
Screenshot 2026-05-23 at 10 39 51 PM
Plex
Screenshot 2026-05-23 at 10 39 45 PM
Jellyfin!

Also added RegisterCustomPlaylistRefresh in jobs.go, to fetch tracks from the playlist on a schedule from their source, for users that want to refetch tracks periodically. This is fundamentally different from explo playlists as they were originally fetching from LB.

PlaylistCard.jsx now has an ellipsis menu to store playlist specific settings, schedule changes has been moved to the ellipsis n

In terms of changes in the backend:
src/web/backend/apple_music.go — HTML scraper (no API key needed; Apple ships playlist data embedded in the page.)
src/util/filesystem.go
src/web/frontend/src/assets/apple-music.svg, listenbrainz.svg : Logos for the ImportModal

I'm probably missing a bunch of stuff but im tired lol this was like 2 weeks of work here, let me know if you have questions or anything :) Be happy to clear up anything. Thank you!!

@LumePart
Copy link
Copy Markdown
Owner

LumePart commented Jun 2, 2026

Thanks so much for the major PR! Merged :)
Will do some clean up to address some bugs/QoL changes related to your PR and earlier PRs

@LumePart LumePart merged commit d49505e into LumePart:dev Jun 2, 2026
4 checks 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.

2 participants