feat: YouTube/YT Music importer + album artist in view mode
- Info modal view now shows Album-Künstler row from Navidrome albumArtist - Song Importer detects youtube.com / youtu.be URLs (red badge) - New /api/youtube/resolve endpoint: yt-dlp --dump-json for single videos and playlists (up to 50 entries), enriched with iTunes lookup for proper album/year/genre/cover on single tracks - New src/youtube.js renders preview card and delegates download to executeSpotifyDownload (which already handles sourceUrl → direct yt-dlp) - Importer hint updated to list YouTube as a supported source Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
3df1990d41
commit
ae48ed4129
6 files changed
+201
-5
No files matched your search
@@ -10,6 +10,7 @@ export function onImporterInput(val) {
|
||||
// Always clear results when URL changes
|
||||
document.getElementById('spotify-preview').style.display = 'none';
|
||||
document.getElementById('sc-preview').style.display = 'none';
|
||||
document.getElementById('yt-preview').style.display = 'none';
|
||||
document.getElementById('importer-hint').style.display = val ? 'none' : '';
|
||||
|
||||
const badge = document.getElementById('importer-badge');
|
||||
@@ -29,6 +30,13 @@ export function onImporterInput(val) {
|
||||
btn.style.background = '#ff5500';
|
||||
btn.style.color = '#fff';
|
||||
btn.style.borderColor = 'transparent';
|
||||
} else if (val.includes('youtube.com') || val.includes('youtu.be')) {
|
||||
badge.textContent = 'YouTube';
|
||||
badge.style.background = 'rgba(255,0,0,.15)';
|
||||
badge.style.color = '#FF0000';
|
||||
btn.style.background = '#FF0000';
|
||||
btn.style.color = '#fff';
|
||||
btn.style.borderColor = 'transparent';
|
||||
} else {
|
||||
badge.textContent = 'URL';
|
||||
badge.style.background = '';
|
||||
@@ -48,6 +56,8 @@ export async function resolveImporterLink() {
|
||||
document.getElementById('importer-hint').style.display = 'none';
|
||||
if (url.includes('soundcloud.com')) {
|
||||
window.resolveSoundCloudLink();
|
||||
} else if (url.includes('youtube.com') || url.includes('youtu.be')) {
|
||||
window.resolveYouTubeLink();
|
||||
} else {
|
||||
resolveSpotifyLink();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user