feat: accept & and / as artist separators in metadata editor
_fmtArtists and _normalizeArtists now split on & and / in addition to • · ; , — so "Arriez & King Dif" typed in the field normalizes correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0823c1ca86
commit
64232a39fe
2 files changed
+2
-2
No files matched your search
@@ -244,7 +244,7 @@ app.post('/api/spotify/resolve', async (req, res) => {
|
|||||||
// and rejoins with the canonical sep ("; " for track artist, ", " for album artist).
|
// and rejoins with the canonical sep ("; " for track artist, ", " for album artist).
|
||||||
function _normalizeArtists(str, sep) {
|
function _normalizeArtists(str, sep) {
|
||||||
if (!str) return str;
|
if (!str) return str;
|
||||||
return str.split(/\s*[•·;,]\s*/).map(s => s.trim()).filter(Boolean).join(sep);
|
return str.split(/\s*[•·;,&/]\s*/).map(s => s.trim()).filter(Boolean).join(sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Strip " - Topic" suffix YouTube Music appends to artist channel names
|
// Strip " - Topic" suffix YouTube Music appends to artist channel names
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ document.addEventListener('click', e => {
|
|||||||
// Track artist → "Serph; Zun" | Album artist → "Serph, Zun"
|
// Track artist → "Serph; Zun" | Album artist → "Serph, Zun"
|
||||||
function _fmtArtists(str, sep) {
|
function _fmtArtists(str, sep) {
|
||||||
if (!str) return '';
|
if (!str) return '';
|
||||||
return str.split(/\s*[•·;,]\s*/).map(s => s.trim()).filter(Boolean).join(sep);
|
return str.split(/\s*[•·;,&/]\s*/).map(s => s.trim()).filter(Boolean).join(sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _renderInfoModal(s) {
|
function _renderInfoModal(s) {
|
||||||
|
|||||||
Reference in new issue
Block a user