list-editor: preserve aliases + description across URL edit
The url-edit modal's save handler was rebuilding state.music[idx] from scratch using only meta-lookup fields, silently dropping aliases and (newly added) description. Carry them over from prev so editing a track's URL no longer wipes operator-entered metadata. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -396,7 +396,10 @@
|
|||||||
url: meta.url || url,
|
url: meta.url || url,
|
||||||
title: meta.title || prev.title || '',
|
title: meta.title || prev.title || '',
|
||||||
artist: meta.channel || prev.artist || '',
|
artist: meta.channel || prev.artist || '',
|
||||||
durationSec: typeof meta.durationSec === 'number' ? meta.durationSec : (prev.durationSec || 0)
|
durationSec: typeof meta.durationSec === 'number' ? meta.durationSec : (prev.durationSec || 0),
|
||||||
|
// URL 만 바뀌었다고 운영자가 손으로 입력한 메타(별칭/설명)까지 날려선 안 된다.
|
||||||
|
aliases: Array.isArray(prev.aliases) ? prev.aliases : [],
|
||||||
|
description: typeof prev.description === 'string' ? prev.description : ''
|
||||||
}
|
}
|
||||||
markDirty()
|
markDirty()
|
||||||
closeAllModals()
|
closeAllModals()
|
||||||
|
|||||||
Reference in New Issue
Block a user