diff --git a/Demo/dark.png b/Demo/dark.png new file mode 100644 index 0000000..44cedfd Binary files /dev/null and b/Demo/dark.png differ diff --git a/Demo/light.png b/Demo/light.png new file mode 100644 index 0000000..ab9a0cf Binary files /dev/null and b/Demo/light.png differ diff --git a/NCMDumpCLI/NCMDump.ico b/NCMDumpCLI/NCMDump.ico index 66db9bf..806974e 100644 Binary files a/NCMDumpCLI/NCMDump.ico and b/NCMDumpCLI/NCMDump.ico differ diff --git a/NCMDumpCLI/NCMDumpCLI.csproj b/NCMDumpCLI/NCMDumpCLI.csproj index fae01c9..24ded9a 100644 --- a/NCMDumpCLI/NCMDumpCLI.csproj +++ b/NCMDumpCLI/NCMDumpCLI.csproj @@ -2,17 +2,19 @@ Exe - net7.0-windows10.0.19041.0 + net8.0-windows10.0.19041.0 enable enable NCMDumpCLI NCMDump.ico x64 app.manifest - 1.6.2 + 2.0.0 x64 + + @@ -21,4 +23,8 @@ + + + + diff --git a/NCMDumpCLI/Program.cs b/NCMDumpCLI/Program.cs index caf68b5..f195fef 100644 --- a/NCMDumpCLI/Program.cs +++ b/NCMDumpCLI/Program.cs @@ -39,8 +39,9 @@ public static void Main(string[] args) Console.Write("Press Any Key to Exit..."); Console.ReadLine(); + return; - async void WalkThrough(DirectoryInfo dir) + void WalkThrough(DirectoryInfo dir) { Console.WriteLine("DIR: " + dir.FullName); foreach (DirectoryInfo d in dir.GetDirectories()) @@ -50,7 +51,7 @@ async void WalkThrough(DirectoryInfo dir) foreach (FileInfo f in dir.EnumerateFiles()) { Console.WriteLine("Converting : " + f.FullName); - if (await Core.ConvertAsync(f.FullName)) Console.WriteLine("...OK"); + if (Core.Convert(f.FullName)) Console.WriteLine("...OK"); else Console.WriteLine("...Fail"); Console.WriteLine(); } diff --git a/NCMDumpCLI/ncmdump.png b/NCMDumpCLI/ncmdump.png index 1dcd1e4..42af96c 100644 Binary files a/NCMDumpCLI/ncmdump.png and b/NCMDumpCLI/ncmdump.png differ diff --git a/NCMDumpCore/MetaInfo.cs b/NCMDumpCore/MetaInfo.cs index cab4c55..f60ecf4 100644 --- a/NCMDumpCore/MetaInfo.cs +++ b/NCMDumpCore/MetaInfo.cs @@ -4,18 +4,21 @@ namespace NCMDumpCore { public class MetaInfo { - public int musicId { get; set; } + public string musicId { get; set; } public string musicName { get; set; } public List> artist { get; set; } - public int albumId { get; set; } + public string albumId { get; set; } public string album { get; set; } public JsonElement albumPicDocId { get; set; } public string albumPic { get; set; } public int bitrate { get; set; } public string mp3DocId { get; set; } public int duration { get; set; } - public int mvId { get; set; } + public string mvId { get; set; } public List alias { get; set; } + public List transNames { get; set; } public string format { get; set; } + public JsonElement fee { get; set; } + public Dictionary privilege { get; set; } } } \ No newline at end of file diff --git a/NCMDumpCore/NCMDumpCore.csproj b/NCMDumpCore/NCMDumpCore.csproj index 29541db..ed1cb0e 100644 --- a/NCMDumpCore/NCMDumpCore.csproj +++ b/NCMDumpCore/NCMDumpCore.csproj @@ -1,13 +1,14 @@  - net7.0; + net8.0; enable enable - 1.6.2 + 1.7.0 x64 + Library diff --git a/NCMDumpCore/RC4_NCM.cs b/NCMDumpCore/RC4_NCM.cs index 7f975a4..38ac780 100644 --- a/NCMDumpCore/RC4_NCM.cs +++ b/NCMDumpCore/RC4_NCM.cs @@ -1,9 +1,5 @@ namespace NCMDumpCore { - /// - /// In Cloud Music. There is a modified RC4 encryptor. - /// Not standard RC4 algorithm. - /// public class RC4_NCM { private byte[] Keybox; diff --git a/NCMDumpGUI/App.xaml b/NCMDumpGUI/App.xaml index 0c0072f..3a323f0 100644 --- a/NCMDumpGUI/App.xaml +++ b/NCMDumpGUI/App.xaml @@ -1,12 +1,12 @@  + xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - - + + diff --git a/NCMDumpGUI/App.xaml.cs b/NCMDumpGUI/App.xaml.cs index 75469f3..faaa9f5 100644 --- a/NCMDumpGUI/App.xaml.cs +++ b/NCMDumpGUI/App.xaml.cs @@ -1,11 +1,39 @@ -using System.Windows; +using Microsoft.Extensions.DependencyInjection; +using NCMDumpCore; +using System; +using System.Windows; namespace NCMDumpGUI { - /// - /// Interaction logic for App.xaml - /// public partial class App : Application { + private IServiceProvider _serviceProvider; + + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + var services = new ServiceCollection(); + ConfigureServices(services); + _serviceProvider = services.BuildServiceProvider(); + var mainWindow = _serviceProvider.GetRequiredService(); + mainWindow.Show(); + } + + private void ConfigureServices(IServiceCollection services) + { + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + } + + protected override void OnExit(ExitEventArgs e) + { + if (_serviceProvider is IDisposable disposable) + { + disposable.Dispose(); + } + + base.OnExit(e); + } } } \ No newline at end of file diff --git a/NCMDumpGUI/MainWindow.xaml b/NCMDumpGUI/MainWindow.xaml index 01d9092..5191f01 100644 --- a/NCMDumpGUI/MainWindow.xaml +++ b/NCMDumpGUI/MainWindow.xaml @@ -1,108 +1,130 @@ - + Closed="Window_Closed" + ExtendsContentIntoTitleBar="True" + WindowBackdropType="Acrylic"> - - - - - + - - - + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -