On Deck tweaks + Bugfixes (#1141)
* Tweaked the On deck to only look for series that have progress in past 30 days. This number is just to test it out, it will be configurable later. Tweaked the layout of the dashboard to remove a redundant section. * Fixed a bug where archives with __MACOSX/ inside would break the reader during flattening. * Fixed a bug where confirm service rejection should have resolved as false. * Fixed an issue with checking if server is accessible with loopback and local ips
This commit is contained in:
parent
5aa40142c4
commit
b921a14e12
9 changed files with 81 additions and 16 deletions
|
@ -208,6 +208,9 @@ namespace API.Tests.Parser
|
|||
[InlineData("MACOSX/Love Hina/", false)]
|
||||
[InlineData("._Love Hina/Love Hina/", true)]
|
||||
[InlineData("@Recently-Snapshot/Love Hina/", true)]
|
||||
[InlineData("@recycle/Love Hina/", true)]
|
||||
[InlineData("@recycle/Love Hina/", true)]
|
||||
[InlineData("E:/Test/__MACOSX/Love Hina/", true)]
|
||||
public void HasBlacklistedFolderInPathTest(string inputPath, bool expected)
|
||||
{
|
||||
Assert.Equal(expected, HasBlacklistedFolderInPath(inputPath));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions.TestingHelpers;
|
||||
|
@ -755,6 +755,22 @@ namespace API.Tests.Services
|
|||
Assert.True(fileSystem.Directory.Exists($"{testDirectory}subdir/"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Flatten_ShouldFlatten_WithoutMacosx()
|
||||
{
|
||||
const string testDirectory = "/manga/";
|
||||
var fileSystem = new MockFileSystem();
|
||||
fileSystem.AddDirectory(testDirectory);
|
||||
fileSystem.AddFile($"{testDirectory}data-1.jpg", new MockFileData("abc"));
|
||||
fileSystem.AddFile($"{testDirectory}subdir/data-3.webp", new MockFileData("abc"));
|
||||
fileSystem.AddFile($"{testDirectory}__MACOSX/data-4.webp", new MockFileData("abc"));
|
||||
|
||||
var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), fileSystem);
|
||||
ds.Flatten($"{testDirectory}");
|
||||
Assert.Equal(2, ds.GetFiles(testDirectory).Count());
|
||||
Assert.False(fileSystem.FileExists($"{testDirectory}data-4.webp"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CheckWriteAccess
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue