Fix Beatport download bubbles missing for releases and on page navigation

- Add navigation triggers for Beatport bubbles on sync page load, Beatport
  tab switch, and rebuild tab activation (mirroring artist bubble pattern)
- Register download bubbles for Beatport releases (albums, EPs, singles)
  which were only created for chart/playlist downloads
- Extend modal close cleanup to handle beatport_release_ prefix
This commit is contained in:
Broque Thomas 2026-03-18 07:21:06 -07:00
parent cde5754f0f
commit a7c7d9e6ed

View file

@ -7675,6 +7675,9 @@ async function loadSyncData() {
// Render saved URL histories for YouTube, Deezer, Spotify Link tabs // Render saved URL histories for YouTube, Deezer, Spotify Link tabs
initUrlHistories(); initUrlHistories();
// Refresh Beatport download bubbles (navigation trigger, like showArtistDownloadsSection in artists page)
showBeatportDownloadsSection();
} }
async function checkForActiveProcesses() { async function checkForActiveProcesses() {
@ -10586,8 +10589,8 @@ async function closeDownloadMissingModal(playlistId) {
console.log(`✅ [MODAL CLOSE] Search download cleanup completed for: ${playlistId}`); console.log(`✅ [MODAL CLOSE] Search download cleanup completed for: ${playlistId}`);
} }
// Clean up Beatport download if this is a beatport chart playlist // Clean up Beatport download if this is a beatport chart or release playlist
if (playlistId.startsWith('beatport_chart_')) { if (playlistId.startsWith('beatport_chart_') || playlistId.startsWith('beatport_release_')) {
console.log(`🧹 [MODAL CLOSE] Cleaning up Beatport download for completed modal: ${playlistId}`); console.log(`🧹 [MODAL CLOSE] Cleaning up Beatport download for completed modal: ${playlistId}`);
cleanupBeatportDownload(playlistId); cleanupBeatportDownload(playlistId);
console.log(`✅ [MODAL CLOSE] Beatport download cleanup completed for: ${playlistId}`); console.log(`✅ [MODAL CLOSE] Beatport download cleanup completed for: ${playlistId}`);
@ -24000,6 +24003,11 @@ function initializeSyncPage() {
if (tabId === 'mirrored' && !mirroredPlaylistsLoaded) { if (tabId === 'mirrored' && !mirroredPlaylistsLoaded) {
loadMirroredPlaylists(); loadMirroredPlaylists();
} }
// Refresh Beatport download bubbles when switching to the Beatport tab
if (tabId === 'beatport') {
showBeatportDownloadsSection();
}
}); });
}); });
@ -24073,6 +24081,7 @@ function initializeSyncPage() {
initializeBeatportHypePicksSlider(); initializeBeatportHypePicksSlider();
initializeBeatportChartsSlider(); initializeBeatportChartsSlider();
initializeBeatportDJSlider(); initializeBeatportDJSlider();
showBeatportDownloadsSection();
} }
}); });
}); });
@ -43551,6 +43560,10 @@ async function handleBeatportReleaseCardClick(cardElement, release) {
false false
); );
// Register Beatport download bubble for releases (albums, EPs, singles)
const releaseImage = (data.album.images && data.album.images.length > 0) ? data.album.images[0].url : (release.image_url || '');
registerBeatportDownload(playlistName, releaseImage, virtualPlaylistId);
hideLoadingOverlay(); hideLoadingOverlay();
_beatportModalOpening = false; _beatportModalOpening = false;
console.log(`✅ Opened download modal for ${playlistName}`); console.log(`✅ Opened download modal for ${playlistName}`);