feat: import custom playlists from Listenbrainz/Apple Music#155
Merged
Conversation
…_playlists.go for CRUD and JSON storage, RegisterCustomPlaylistRefresh for custom refreshes, and isValidPlaylistID for custom IDs
…tend schedule states
…flags, add "never refresh" option
…c playlist logic
…on connect by exposing Flush(), fix playlist name URL encoding bug in all music players
* Add spotify playlist fetching, updated frontend touchpoints * Refactor track handling to use PlaylistTrack for better searches for spotify imports * Add CleanSearchTitle
Owner
|
Thanks so much for the major PR! Merged :) |
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.
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.
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_FLAGSand_SCHEDULEfor 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 throughloadCustomTracksinstead ofdiscovery.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 :)


Plex
Jellyfin!
Also added
RegisterCustomPlaylistRefreshinjobs.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 ImportModalI'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!!