mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Use Matching to replace NaturalSort
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using SabreTools.Core;
|
||||
using SabreTools.IO;
|
||||
using SabreTools.Matching;
|
||||
|
||||
namespace SabreTools.FileTypes.Aaru
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using SabreTools.Core;
|
||||
using SabreTools.Matching;
|
||||
#if NET462_OR_GREATER || NETCOREAPP
|
||||
using SharpCompress.Archives;
|
||||
using SharpCompress.Archives.Rar;
|
||||
@@ -242,7 +243,7 @@ namespace SabreTools.FileTypes.Archives
|
||||
try
|
||||
{
|
||||
SharpCompress.Archives.Rar.RarArchive ra = SharpCompress.Archives.Rar.RarArchive.Open(this.Filename, new ReaderOptions { LeaveStreamOpen = false });
|
||||
List<RarArchiveEntry> rarEntries = ra.Entries.OrderBy(e => e.Key, new NaturalSort.NaturalReversedComparer()).ToList();
|
||||
List<RarArchiveEntry> rarEntries = ra.Entries.OrderBy(e => e.Key, new NaturalReversedComparer()).ToList();
|
||||
string? lastRarEntry = null;
|
||||
foreach (RarArchiveEntry entry in rarEntries)
|
||||
{
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
using SabreTools.Core;
|
||||
using SabreTools.Core.Tools;
|
||||
using Compress;
|
||||
using Compress.SevenZip;
|
||||
using NaturalSort;
|
||||
using SabreTools.Core;
|
||||
using SabreTools.Core.Tools;
|
||||
using SabreTools.Matching;
|
||||
|
||||
namespace SabreTools.FileTypes.Archives
|
||||
{
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Compress;
|
||||
using SabreTools.Core;
|
||||
using SabreTools.Core.Tools;
|
||||
using Compress;
|
||||
using SabreTools.Matching;
|
||||
#if NET462_OR_GREATER || NETCOREAPP
|
||||
using SharpCompress.Archives;
|
||||
using SharpCompress.Archives.Tar;
|
||||
@@ -231,7 +232,7 @@ namespace SabreTools.FileTypes.Archives
|
||||
try
|
||||
{
|
||||
TarArchive ta = TarArchive.Open(this.Filename!, new ReaderOptions { LeaveStreamOpen = false });
|
||||
List<TarArchiveEntry> tarEntries = ta.Entries.OrderBy(e => e.Key, new NaturalSort.NaturalReversedComparer()).ToList();
|
||||
List<TarArchiveEntry> tarEntries = ta.Entries.OrderBy(e => e.Key, new NaturalReversedComparer()).ToList();
|
||||
string? lastTarEntry = null;
|
||||
foreach (TarArchiveEntry entry in tarEntries)
|
||||
{
|
||||
|
||||
@@ -4,9 +4,9 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using Compress;
|
||||
using Compress.ZipFile;
|
||||
using NaturalSort;
|
||||
using SabreTools.Core;
|
||||
using SabreTools.Core.Tools;
|
||||
using SabreTools.Matching;
|
||||
|
||||
namespace SabreTools.FileTypes.Archives
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using SabreTools.FileTypes.Aaru;
|
||||
using SabreTools.FileTypes.CHD;
|
||||
using SabreTools.IO;
|
||||
using SabreTools.Logging;
|
||||
using SabreTools.Matching;
|
||||
using SabreTools.Skippers;
|
||||
|
||||
namespace SabreTools.FileTypes
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NaturalSort\NaturalSort.csproj" />
|
||||
<ProjectReference Include="..\SabreTools.Core\SabreTools.Core.csproj" />
|
||||
<ProjectReference Include="..\SabreTools.Logging\SabreTools.Logging.csproj" />
|
||||
</ItemGroup>
|
||||
@@ -35,6 +34,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SabreTools.IO" Version="1.3.0" />
|
||||
<PackageReference Include="SabreTools.Matching" Version="1.3.1" />
|
||||
<PackageReference Include="SabreTools.Skippers" Version="1.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user