diff --git a/csharp/Plugins/BinSvip/BinarySvipConverter.cs b/csharp/Plugins/BinSvip/BinarySvipConverter.cs index 269b860..5c194ba 100644 --- a/csharp/Plugins/BinSvip/BinarySvipConverter.cs +++ b/csharp/Plugins/BinSvip/BinarySvipConverter.cs @@ -16,9 +16,9 @@ public Project Load(string path, ConverterOptions options) var stream = new FileStream(path, FileMode.Open, FileAccess.Read); var reader = new BinaryReader(stream); var version = reader.ReadString() + reader.ReadString(); - var model = (SingingTool.Model.AppModel) new BinaryFormatter().Deserialize(stream); stream.Close(); reader.Close(); + var model = SingingTool.Model.ProjectModelFileMgr.ReadModelFile(path, out _, out _); return new BinarySvipDecoder().DecodeProject(version, model); } @@ -68,14 +68,14 @@ private static string FindLibrary() throw new FileNotFoundException("未检测到已安装的 X Studio · 歌手软件。"); } var value = key.GetValue("").ToString().Split('"')[1]; - return value.Substring(0, value.Length - 18); + return Path.GetDirectoryName(value); } private static Assembly SingingToolResolveEventHandler(object sender, ResolveEventArgs args) { var path = FindLibrary(); var filename = args.Name.Split(',')[0]; - return Assembly.LoadFile($@"{path}\{filename}.dll"); + return Assembly.LoadFile(Path.Combine(path, filename + ".dll")); } } } diff --git a/csharp/Plugins/BinSvip/Properties.xml b/csharp/Plugins/BinSvip/Properties.xml index 78832bc..26f9930 100644 --- a/csharp/Plugins/BinSvip/Properties.xml +++ b/csharp/Plugins/BinSvip/Properties.xml @@ -1,7 +1,7 @@  BinSvip - 1.1.1 + 1.1.2 YQ之神 https://space.bilibili.com/102844209 原始二进制 .svip 文件转换插件。