fix: correct artist names and prevent wrong song downloads for Japanese tracks
- spotify.js: stop overwriting trackName with iTunes English title — yt-dlp must search with original Japanese title to find the right song (was downloading English covers e.g. Ghost In A Flower instead of 幽霊花) - metadata.js: add title-only fallback in lookupItunesTrackMeta so tracks are found even when kuromoji gives wrong artist romanization (e.g. Terui Jun Sei vs iTunes Yoshimasa Terui); also return itunesArtistName - novasonic-server.js: use itunesArtistName from iTunes lookup as the stored artist when available (single-track and playlist download paths) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
392da7e021
commit
c7bebd5691
3 files changed
+22
-18
No files matched your search
+2
-4
@@ -295,10 +295,8 @@ async function _loadSpotifyTrackArtwork(tracks, listEl) {
|
||||
if (match.trackExplicitness) t.trackExplicitness = match.trackExplicitness;
|
||||
if (match.previewUrl) t.previewUrl = match.previewUrl;
|
||||
if (match.trackTimeMillis) t.durationMs = match.trackTimeMillis;
|
||||
// Use iTunes canonical English/romaji names — more accurate than Spotify (which may use Japanese)
|
||||
if (match.artistName) t.artistName = match.artistName;
|
||||
const JP_RE = /[-ヿ一-鿿]/;
|
||||
if (JP_RE.test(t.trackName) && match.trackName) t.trackName = match.trackName;
|
||||
// Use iTunes canonical English/romaji artist name (Spotify may have Japanese or wrong order)
|
||||
if (match.artistName) t.artistName = match.artistName;
|
||||
if (window._spotifyResolved?.tracks?.[idx]) Object.assign(window._spotifyResolved.tracks[idx], t);
|
||||
const url = match.artworkUrl100 || match.artworkUrl60 || '';
|
||||
if (url) _setArt(artEls[idx], url);
|
||||
|
||||
Reference in new issue
Block a user