Added a sorting mechanism to emulate how windows sorts files. Refactored cache to support chapter folders as well.
This commit is contained in:
parent
6020697d7d
commit
f737f662df
11 changed files with 237 additions and 32 deletions
17
API/Comparators/NumericComparer.cs
Normal file
17
API/Comparators/NumericComparer.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections;
|
||||
|
||||
namespace API.Comparators
|
||||
{
|
||||
public class NumericComparer : IComparer
|
||||
{
|
||||
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
if((x is string xs) && (y is string ys))
|
||||
{
|
||||
return StringLogicalComparer.Compare(xs, ys);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue