diff --git a/webui/static/script.js b/webui/static/script.js index dbe909ce..d1dc9288 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -8261,10 +8261,13 @@ function initializeSearchModeToggle() { // Format playlist name const playlistName = `[${album.artist}] ${albumData.name}`; - // Create minimal artist object for the modal + // Create artist object for the modal — extract ID from album data + const firstArtist = (albumData.artists || [])[0] || {}; const artistObject = { - id: null, // No artist ID from enhanced search - name: album.artist + id: firstArtist.id || album.id?.split?.('_')?.[0] || '', + name: firstArtist.name || album.artist, + image_url: firstArtist.image_url || firstArtist.images?.[0]?.url || '', + source: _activeSearchSource || '', }; // Prepare full album object for modal @@ -10710,7 +10713,7 @@ function generateDownloadModalHeroSection(context) {

${escapeHtml(album.name || 'Unknown Album')}

-
by ${escapeHtml(artist.name || 'Unknown Artist')}
+
by ${escapeHtml(artist.name || 'Unknown Artist')}
${album.album_type || 'Album'} ${trackCount} tracks @@ -11445,6 +11448,22 @@ async function openDownloadMissingModalForYouTube(virtualPlaylistId, playlistNam hideLoadingOverlay(); } +function _navigateToArtistFromModal(artistId, artistName, imageUrl, source, playlistId) { + if (!artistName) return; + // Close the download modal + if (playlistId) closeDownloadMissingModal(playlistId); + // Navigate to Artists page and load discography + navigateToPage('artists'); + setTimeout(() => { + // If we have an artist ID, use it directly + // If not, search by name — selectArtistForDetail handles both + selectArtistForDetail( + { id: artistId || artistName, name: artistName, image_url: imageUrl || '' }, + source ? { source: source } : undefined + ); + }, 200); +} + async function closeDownloadMissingModal(playlistId) { const process = activeDownloadProcesses[playlistId]; if (!process) { diff --git a/webui/static/style.css b/webui/static/style.css index 250b5577..75ca03a6 100644 --- a/webui/static/style.css +++ b/webui/static/style.css @@ -15339,6 +15339,18 @@ body.helper-mode-active #dashboard-activity-feed:hover { font-weight: 500; margin: 0; opacity: 0.9; +} + +.hero-artist-link { + color: rgb(var(--accent-light-rgb)); + text-decoration: none; + transition: color 0.15s ease, opacity 0.15s ease; + cursor: pointer; +} + +.hero-artist-link:hover { + color: rgb(var(--accent-rgb)); + text-decoration: underline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;