// =================================================================== // LAST.FM RADIO SYNC TAB // =================================================================== // Phase 1c.2 of the Discover-to-Sync unification. Surfaces the user's // generated Last.fm Radio playlists as a Sync-page tab so they can be // discovered + mirrored alongside ListenBrainz, Tidal, Qobuz, etc. // // Last.fm Radio playlists live in the same ``listenbrainz_playlists`` // SQLite table as ListenBrainz playlists (with // ``playlist_type='lastfm_radio'``) and run through the same // ``openDownloadModalForListenBrainzPlaylist`` discovery flow. So this // module is intentionally thin β list + render + click handoff. // The refresh loop, discovery polling, syncβmirror creation, and the // modal itself are all shared with the ListenBrainz tab. // // New Last.fm radios are GENERATED from the Discover page (with a // seed track). This tab is for listing existing radios + syncing // them to a mirror β not for generation. let _lastfmSyncPlaylists = []; async function loadLastfmSyncPlaylists() { const container = document.getElementById('lastfm-sync-playlist-container'); const refreshBtn = document.getElementById('lastfm-sync-refresh-btn'); if (!container) return; container.innerHTML = `