From 22d84e5dfa61c4ea51db228b1d2dac6d0283ef4f Mon Sep 17 00:00:00 2001 From: Starrah Date: Tue, 27 Jan 2026 20:16:54 +0800 Subject: [PATCH 1/5] fix: add missing MaiLib VCS config .idea/.../vcs.xml --- .idea/.idea.Sitreamai/.idea/vcs.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/.idea/.idea.Sitreamai/.idea/vcs.xml b/.idea/.idea.Sitreamai/.idea/vcs.xml index ee5ff3d..6b5faa8 100644 --- a/.idea/.idea.Sitreamai/.idea/vcs.xml +++ b/.idea/.idea.Sitreamai/.idea/vcs.xml @@ -3,6 +3,7 @@ + From 33c952ebb424c5df227fd4b985ef870ee3f4abbd Mon Sep 17 00:00:00 2001 From: Starrah Date: Tue, 27 Jan 2026 21:08:43 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E4=BD=BF=E7=94=A8=E2=80=9C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=AD=8C=E6=9B=B2ID=E2=80=9D=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=9B=BE=E7=89=87=E4=BC=9A=E8=A2=AB=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=88=B0=E9=94=99=E8=AF=AF=E7=9A=84=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref: 210b7ec。属于是上次没修干净。 图片会被移动到Pacakge/StreamingAssets/...而非正确的Pacakge/Sinmai_Data/StreamingAssets/...下。 --- MaiChartManager/Controllers/Music/MusicTransferController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MaiChartManager/Controllers/Music/MusicTransferController.cs b/MaiChartManager/Controllers/Music/MusicTransferController.cs index 07242c0..a951f7c 100644 --- a/MaiChartManager/Controllers/Music/MusicTransferController.cs +++ b/MaiChartManager/Controllers/Music/MusicTransferController.cs @@ -230,7 +230,7 @@ public void ModifyId(int id, [FromBody] int newId, string assetDir) var movieTarget = Path.Combine(StaticSettings.StreamingAssets, assetDir, "MovieData", $"{newNonDxId:000000}"); var newMusicDir = Path.Combine(StaticSettings.StreamingAssets, assetDir, "music", $"music{newNonDxId:000000}"); DeleteIfExists(abJacketTarget, abJacketTarget + ".manifest", acbawbTarget + ".acb", acbawbTarget + ".awb", movieTarget + ".dat", movieTarget + ".mp4", newMusicDir); - var abiDir = Path.Combine(StaticSettings.GamePath, "StreamingAssets", assetDir, @"AssetBundleImages\jacket"); + var abiDir = Path.Combine(StaticSettings.StreamingAssets, assetDir, @"AssetBundleImages\jacket"); Directory.CreateDirectory(abiDir); // jacket From 75e47648b5f68528f73d1d190f1e2acd7e105830 Mon Sep 17 00:00:00 2001 From: Starrah Date: Tue, 27 Jan 2026 21:26:15 +0800 Subject: [PATCH 3/5] =?UTF-8?q?refactor:=20=E5=90=88=E5=B9=B6=E4=B8=80?= =?UTF-8?q?=E6=AE=B5=E5=9C=A8=E4=BB=A3=E7=A0=81=E4=B8=8A=E5=AE=8C=E5=85=A8?= =?UTF-8?q?=E4=B8=80=E6=A0=B7=E7=9A=84=E5=86=97=E4=BD=99=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前的if (music.JacketPath is not null)和else if (music.PseudoAssetBundleJacket is not null)里面的行为完全是一样的,没必要拆成两个 --- .../Music/MusicTransferController.cs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/MaiChartManager/Controllers/Music/MusicTransferController.cs b/MaiChartManager/Controllers/Music/MusicTransferController.cs index a951f7c..5150b6c 100644 --- a/MaiChartManager/Controllers/Music/MusicTransferController.cs +++ b/MaiChartManager/Controllers/Music/MusicTransferController.cs @@ -234,22 +234,18 @@ public void ModifyId(int id, [FromBody] int newId, string assetDir) Directory.CreateDirectory(abiDir); // jacket - if (music.JacketPath is not null) - { - var localJacketTarget = Path.Combine(abiDir, $"ui_jacket_{newNonDxId:000000}{Path.GetExtension(music.JacketPath)}"); - DeleteIfExists(localJacketTarget); - logger.LogInformation("Move jacket: {music.JacketPath} -> {localJacketTarget}", music.JacketPath, localJacketTarget); - FileSystem.MoveFile(music.JacketPath, localJacketTarget, UIOption.OnlyErrorDialogs); - } - else if (music.PseudoAssetBundleJacket is not null) + var jacketSourcePng = music.JacketPath is not null ? music.JacketPath : music.PseudoAssetBundleJacket; + if (jacketSourcePng is not null) { - var localJacketTarget = Path.Combine(abiDir, $"ui_jacket_{newNonDxId:000000}{Path.GetExtension(music.PseudoAssetBundleJacket)}"); + // 如果music.JacketPath或music.PseudoAssetBundleJacket不为空,则直接执行移动逻辑即可 + var localJacketTarget = Path.Combine(abiDir, $"ui_jacket_{newNonDxId:000000}{Path.GetExtension(jacketSourcePng)}"); DeleteIfExists(localJacketTarget); - logger.LogInformation("Move jacket: {music.PseudoAssetBundleJacket} -> {localJacketTarget}", music.PseudoAssetBundleJacket, localJacketTarget); - FileSystem.MoveFile(music.PseudoAssetBundleJacket, localJacketTarget, UIOption.OnlyErrorDialogs); + logger.LogInformation("Move jacket: {jacketSourcePng} -> {localJacketTarget}", jacketSourcePng, localJacketTarget); + FileSystem.MoveFile(jacketSourcePng, localJacketTarget, UIOption.OnlyErrorDialogs); } else if (music.AssetBundleJacket is not null) { + // 否则需要执行转换逻辑 var localJacketTarget = Path.Combine(abiDir, $"ui_jacket_{newNonDxId:000000}.png"); logger.LogInformation("Convert jacket: {music.AssetBundleJacket} -> {abJacketTarget}", music.AssetBundleJacket, abJacketTarget); System.IO.File.WriteAllBytes(localJacketTarget, music.GetMusicJacketPngData()!); From 892df07efa17bb2a480ec19b3f2e894d42d11b2a Mon Sep 17 00:00:00 2001 From: Starrah Date: Tue, 27 Jan 2026 21:40:38 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E8=B0=B1=E9=9D=A2=E8=B7=AF=E5=BE=84?= =?UTF-8?q?newMusicDir=E4=B8=8D=E5=BA=94=E8=AF=A5=E5=AF=B910000=E5=8F=96?= =?UTF-8?q?=E6=A8=A1=E3=80=82=E5=85=B6=E4=BB=96=E7=9A=84=EF=BC=88=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E3=80=81=E9=9F=B3=E9=A2=91=E7=AD=89=EF=BC=89=E6=89=8D?= =?UTF-8?q?=E9=9C=80=E8=A6=81=EF=BC=8C=E8=B0=B1=E9=9D=A2=E6=98=AF=E4=B8=8D?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=9A=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MaiChartManager/Controllers/Music/MusicTransferController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MaiChartManager/Controllers/Music/MusicTransferController.cs b/MaiChartManager/Controllers/Music/MusicTransferController.cs index 5150b6c..61ef13f 100644 --- a/MaiChartManager/Controllers/Music/MusicTransferController.cs +++ b/MaiChartManager/Controllers/Music/MusicTransferController.cs @@ -228,7 +228,7 @@ public void ModifyId(int id, [FromBody] int newId, string assetDir) var abJacketTarget = Path.Combine(StaticSettings.StreamingAssets, assetDir, "AssetBundleImages", "jacket", $"ui_jacket_{newNonDxId:000000}.ab"); var acbawbTarget = Path.Combine(StaticSettings.StreamingAssets, assetDir, "SoundData", $"music{newNonDxId:000000}"); var movieTarget = Path.Combine(StaticSettings.StreamingAssets, assetDir, "MovieData", $"{newNonDxId:000000}"); - var newMusicDir = Path.Combine(StaticSettings.StreamingAssets, assetDir, "music", $"music{newNonDxId:000000}"); + var newMusicDir = Path.Combine(StaticSettings.StreamingAssets, assetDir, "music", $"music{newId:000000}"); DeleteIfExists(abJacketTarget, abJacketTarget + ".manifest", acbawbTarget + ".acb", acbawbTarget + ".awb", movieTarget + ".dat", movieTarget + ".mp4", newMusicDir); var abiDir = Path.Combine(StaticSettings.StreamingAssets, assetDir, @"AssetBundleImages\jacket"); Directory.CreateDirectory(abiDir); From 503e6e9feec4432a39b426c3eaf462898c2baca5 Mon Sep 17 00:00:00 2001 From: Starrah Date: Tue, 27 Jan 2026 22:52:32 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E5=8F=98?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Music/MusicTransferController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MaiChartManager/Controllers/Music/MusicTransferController.cs b/MaiChartManager/Controllers/Music/MusicTransferController.cs index 61ef13f..108b683 100644 --- a/MaiChartManager/Controllers/Music/MusicTransferController.cs +++ b/MaiChartManager/Controllers/Music/MusicTransferController.cs @@ -234,14 +234,14 @@ public void ModifyId(int id, [FromBody] int newId, string assetDir) Directory.CreateDirectory(abiDir); // jacket - var jacketSourcePng = music.JacketPath is not null ? music.JacketPath : music.PseudoAssetBundleJacket; - if (jacketSourcePng is not null) + var jacketSourcePath = music.JacketPath is not null ? music.JacketPath : music.PseudoAssetBundleJacket; + if (jacketSourcePath is not null) { // 如果music.JacketPath或music.PseudoAssetBundleJacket不为空,则直接执行移动逻辑即可 - var localJacketTarget = Path.Combine(abiDir, $"ui_jacket_{newNonDxId:000000}{Path.GetExtension(jacketSourcePng)}"); + var localJacketTarget = Path.Combine(abiDir, $"ui_jacket_{newNonDxId:000000}{Path.GetExtension(jacketSourcePath)}"); DeleteIfExists(localJacketTarget); - logger.LogInformation("Move jacket: {jacketSourcePng} -> {localJacketTarget}", jacketSourcePng, localJacketTarget); - FileSystem.MoveFile(jacketSourcePng, localJacketTarget, UIOption.OnlyErrorDialogs); + logger.LogInformation("Move jacket: {jacketSourcePng} -> {localJacketTarget}", jacketSourcePath, localJacketTarget); + FileSystem.MoveFile(jacketSourcePath, localJacketTarget, UIOption.OnlyErrorDialogs); } else if (music.AssetBundleJacket is not null) {