From 5d54a62e10cac27fd695fae6fabbc4037b055148 Mon Sep 17 00:00:00 2001
From: waji-rui <151385159+waji-rui@users.noreply.github.com>
Date: Sat, 28 Nov 2026 02:59:41 +0800
Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E6=8D=A2=E6=BA=90=E5=BC=B9?=
=?UTF-8?q?=E7=AA=97=E6=96=B0=E5=A2=9E=E5=90=8C=E6=97=B6=E6=9B=BF=E6=8D=A2?=
=?UTF-8?q?=E6=AD=8C=E5=90=8D=E4=B8=8E=E6=AD=8C=E6=89=8B=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/components/Admin/SongManagement.vue | 3 +
.../Admin/SongSourceReplaceModal.vue | 57 ++++++++++++++-----
app/utils/locale/en-US.ts | 1 +
app/utils/locale/zh-CN.ts | 1 +
4 files changed, 48 insertions(+), 14 deletions(-)
diff --git a/app/components/Admin/SongManagement.vue b/app/components/Admin/SongManagement.vue
index 2d2bc45aa..75db3f1b8 100644
--- a/app/components/Admin/SongManagement.vue
+++ b/app/components/Admin/SongManagement.vue
@@ -2445,6 +2445,9 @@ const applySourceReplacement = (payload) => {
editForm.value.musicId = payload.musicId || ''
if (payload.cover) editForm.value.cover = payload.cover
if (payload.durationSeconds != null) editForm.value.durationSeconds = payload.durationSeconds
+ // 勾选时同步采用新音源的歌名与歌手
+ if (payload.title) editForm.value.title = payload.title
+ if (payload.artist) editForm.value.artist = payload.artist
// 旧播放地址指向原音源,换源后必须清空避免继续使用旧链接
editForm.value.playUrl = ''
editSourceSelection.value = payload.selectionToken
diff --git a/app/components/Admin/SongSourceReplaceModal.vue b/app/components/Admin/SongSourceReplaceModal.vue
index 97b3c1868..25fba3eb8 100644
--- a/app/components/Admin/SongSourceReplaceModal.vue
+++ b/app/components/Admin/SongSourceReplaceModal.vue
@@ -330,22 +330,47 @@
{{ t('sourceReplace.selectHint') }}
-
+
-
+
+
+
+
@@ -421,6 +446,7 @@ const autoSearchPending = ref(false)
const selectedKey = ref('')
const selectedPageIndex = ref(0)
const applying = ref(false)
+const replaceTitleArtist = ref(false)
const platformResults = ref({})
const platformStates = ref({})
@@ -804,7 +830,9 @@ const applySelection = async () => {
musicId,
cover: cover || '',
durationSeconds: durationSeconds || null,
- selectionToken: isPluginPlatform(item.musicPlatform) ? item.selectionToken || '' : ''
+ selectionToken: isPluginPlatform(item.musicPlatform) ? item.selectionToken || '' : '',
+ title: replaceTitleArtist.value ? item.title : null,
+ artist: replaceTitleArtist.value ? item.artist : null
})
} finally {
applying.value = false
@@ -821,6 +849,7 @@ const resetState = () => {
selectedKey.value = ''
selectedPageIndex.value = 0
applying.value = false
+ replaceTitleArtist.value = false
platformResults.value = {}
platformStates.value = {}
platformErrors.value = {}
diff --git a/app/utils/locale/en-US.ts b/app/utils/locale/en-US.ts
index 25edaea97..918654d38 100644
--- a/app/utils/locale/en-US.ts
+++ b/app/utils/locale/en-US.ts
@@ -2828,6 +2828,7 @@ export const admin = {
pageLabel: (page: number) => `P${page}`,
selectedHint:
'Platform, music ID and cover will be replaced; duration updates when available, play URL is cleared',
+ replaceTitleArtist: 'Replace title & artist',
selectHint: 'Select a search result',
apply: 'Apply',
applying: 'Fetching info...',
diff --git a/app/utils/locale/zh-CN.ts b/app/utils/locale/zh-CN.ts
index 7cae39695..39232803d 100644
--- a/app/utils/locale/zh-CN.ts
+++ b/app/utils/locale/zh-CN.ts
@@ -2760,6 +2760,7 @@ export const admin = {
selectPage: '选择分P',
pageLabel: (page: number) => `P${page}`,
selectedHint: '应用后将替换平台、音乐 ID 与封面,可用时更新时长,并清空播放地址',
+ replaceTitleArtist: '同时替换歌名与歌手',
selectHint: '选择一条搜索结果',
apply: '应用替换',
applying: '获取信息中...',
From 536ff7ac7b864f89d574b880c2f82512d8345ab6 Mon Sep 17 00:00:00 2001
From: waji-rui <151385159+waji-rui@users.noreply.github.com>
Date: Sat, 28 Nov 2026 03:11:13 +0800
Subject: [PATCH 2/3] =?UTF-8?q?style:=20=E6=8D=A2=E6=BA=90=E5=BC=80?=
=?UTF-8?q?=E5=85=B3=E6=8C=89=E9=92=AE=E6=94=B9=E4=B8=BA=E6=97=A0=E8=83=8C?=
=?UTF-8?q?=E6=99=AF=E7=BA=AF=E6=96=87=E5=AD=97=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/components/Admin/SongSourceReplaceModal.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/components/Admin/SongSourceReplaceModal.vue b/app/components/Admin/SongSourceReplaceModal.vue
index 25fba3eb8..a3d7b6083 100644
--- a/app/components/Admin/SongSourceReplaceModal.vue
+++ b/app/components/Admin/SongSourceReplaceModal.vue
@@ -334,11 +334,11 @@