fix: improve Spotify importer metadata — copy iTunes durationMs, skip redundant backend lookup when frontend already enriched track

This commit is contained in:
Honey committed 2026-05-14 17:58:36 +02:00
1 parent e78df7bdb9
commit 11dec04fea
2 files changed
+13 -3

No files matched your search

+1
View File
@@ -219,6 +219,7 @@ async function _loadSpotifyTrackArtwork(tracks, listEl) {
if (match.trackNumber) t.trackNumber = match.trackNumber;
if (match.trackExplicitness) t.trackExplicitness = match.trackExplicitness;
if (match.previewUrl) t.previewUrl = match.previewUrl;
if (match.trackTimeMillis) t.durationMs = match.trackTimeMillis;
if (window._spotifyResolved?.tracks?.[idx]) Object.assign(window._spotifyResolved.tracks[idx], t);
const url = match.artworkUrl100 || match.artworkUrl60 || '';
if (url) _setArt(artEls[idx], url);