diff --git a/NCMDumpCLI/NCMDumpCLI.csproj b/NCMDumpCLI/NCMDumpCLI.csproj
index 4d34744..7706245 100644
--- a/NCMDumpCLI/NCMDumpCLI.csproj
+++ b/NCMDumpCLI/NCMDumpCLI.csproj
@@ -9,7 +9,7 @@
NCMDumpCLI.ico
x64
app.manifest
- 1.1.2
+ 1.3.0
diff --git a/NCMDumpCLI/Program.cs b/NCMDumpCLI/Program.cs
index 5917fb4..b8b044a 100644
--- a/NCMDumpCLI/Program.cs
+++ b/NCMDumpCLI/Program.cs
@@ -7,8 +7,6 @@ public static void Main(string[] args)
{
NCMDump Core = new();
-
-
if (args.Length == 0)
{
Console.WriteLine("Drag [*.ncm] file on exe to start");
@@ -42,7 +40,7 @@ public static void Main(string[] args)
Console.Write("Press Any Key to Exit...");
Console.ReadLine();
- void WalkThrough(DirectoryInfo dir)
+ async void WalkThrough(DirectoryInfo dir)
{
Console.WriteLine("DIR: " + dir.FullName);
foreach (DirectoryInfo d in dir.GetDirectories())
@@ -52,7 +50,7 @@ void WalkThrough(DirectoryInfo dir)
foreach (FileInfo f in dir.EnumerateFiles())
{
Console.WriteLine("Converting : " + f.FullName);
- if (Core.Convert(f.FullName)) Console.WriteLine("...OK");
+ if (await Core.ConvertAsync(f.FullName)) Console.WriteLine("...OK");
else Console.WriteLine("...Fail");
Console.WriteLine();
}
diff --git a/NCMDumpCore/NCMDump.cs b/NCMDumpCore/NCMDump.cs
index ebf6561..435aee6 100644
--- a/NCMDumpCore/NCMDump.cs
+++ b/NCMDumpCore/NCMDump.cs
@@ -202,12 +202,12 @@ private uint ReadUint32(MemoryStream ms)
return BitConverter.ToUInt32(buffer);
}
- public async Task ConvertAsync(string path)
+ public bool Convert(string path)
{
- return Convert(path);
+ return Task.Run(()=>ConvertAsync(path)).Result;
}
- public bool Convert(string path)
+ public async Task ConvertAsync(string path)
{
if (!System.IO.File.Exists(path))
{
@@ -216,7 +216,7 @@ public bool Convert(string path)
}
//Read all bytes to ram.
- var ms = new MemoryStream(System.IO.File.ReadAllBytes(path));
+ var ms = new MemoryStream(await System.IO.File.ReadAllBytesAsync(path));
//Verify Header
if (!ReadHeader(ref ms))
diff --git a/NCMDumpCore/NCMDumpCore.csproj b/NCMDumpCore/NCMDumpCore.csproj
index e346f0d..f86eed2 100644
--- a/NCMDumpCore/NCMDumpCore.csproj
+++ b/NCMDumpCore/NCMDumpCore.csproj
@@ -1,9 +1,12 @@
-
+
net6.0-windows10.0.19041.0
enable
enable
+ 1.3.0
+
+
diff --git a/NCMDumpGUI/MainWindow.xaml.cs b/NCMDumpGUI/MainWindow.xaml.cs
index bf79ea5..f8ab4a8 100644
--- a/NCMDumpGUI/MainWindow.xaml.cs
+++ b/NCMDumpGUI/MainWindow.xaml.cs
@@ -4,6 +4,7 @@
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
+using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Forms;
@@ -82,7 +83,7 @@ private async void StartButton_Click(object sender, RoutedEventArgs e)
{
if (NCMCollection[i].FileStatus == "Success") continue;
- if (await core.ConvertAsync(NCMCollection[i].FilePath))
+ if (await Task.Run(()=>core.ConvertAsync(NCMCollection[i].FilePath)))
{
NCMCollection[i].FileStatus = "Success";
this.UpdateLayout();
diff --git a/NCMDumpGUI/NCMDumpGUI.csproj b/NCMDumpGUI/NCMDumpGUI.csproj
index 4e3ba72..b407c5e 100644
--- a/NCMDumpGUI/NCMDumpGUI.csproj
+++ b/NCMDumpGUI/NCMDumpGUI.csproj
@@ -7,7 +7,7 @@
true
NCMDumpCLI.ico
True
- 1.1.2
+ 1.3.0
diff --git a/README.md b/README.md
index 95e77c9..9d021d2 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,14 @@
# NCMDump.NET
+
Decipher .ncm file to mp3 || flac
-# Changelog
+## Changelog
+
+### v1.3
+
+Bug fix.
+
+Async optimization.
### v1.2
@@ -15,21 +22,21 @@ Drag directory on executable support.
Bug fix
-
-# Usage
+## Usage
### CLI
Drag .ncm file or directory on .exe
### GUI
+
~~omission~~
+## System Requirement
-# System Requirement
+### OS : Windows 10 10.0.19041.0 with .NET6 Runtime
-### OS : Windows 10 10.0.19041.0 with .NET6
+## Refrence
-# Refrence
-https://github.com/anonymous5l/ncmdump
+