You can now send emails if you don't use Authentication (#2718)

This commit is contained in:
Joe Milazzo 2024-02-14 14:36:55 -06:00 committed by GitHub
parent 2d81527bd1
commit 7b7609652c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 414 additions and 350 deletions

View file

@ -30,7 +30,7 @@ public class ChapterListExtensionsTests
{
var info = new ParserInfo()
{
Chapters = "0",
Chapters = API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter,
Edition = "",
Format = MangaFormat.Archive,
FullFilePath = "/manga/darker than black.cbz",
@ -38,12 +38,12 @@ public class ChapterListExtensionsTests
IsSpecial = false,
Series = "darker than black",
Title = "darker than black",
Volumes = "0"
Volumes = API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume
};
var chapterList = new List<Chapter>()
{
CreateChapter("darker than black - Some special", "0", CreateFile("/manga/darker than black - special.cbz", MangaFormat.Archive), true)
CreateChapter("darker than black - Some special", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/darker than black - special.cbz", MangaFormat.Archive), true)
};
var actualChapter = chapterList.GetChapterByRange(info);
@ -57,7 +57,7 @@ public class ChapterListExtensionsTests
{
var info = new ParserInfo()
{
Chapters = "0",
Chapters = API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume,
Edition = "",
Format = MangaFormat.Archive,
FullFilePath = "/manga/darker than black.cbz",
@ -65,12 +65,12 @@ public class ChapterListExtensionsTests
IsSpecial = true,
Series = "darker than black",
Title = "darker than black",
Volumes = "0"
Volumes = API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume
};
var chapterList = new List<Chapter>()
{
CreateChapter("darker than black", "0", CreateFile("/manga/darker than black.cbz", MangaFormat.Archive), true)
CreateChapter("darker than black", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/darker than black.cbz", MangaFormat.Archive), true)
};
var actualChapter = chapterList.GetChapterByRange(info);
@ -83,7 +83,7 @@ public class ChapterListExtensionsTests
{
var info = new ParserInfo()
{
Chapters = "0",
Chapters = API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume,
Edition = "",
Format = MangaFormat.Archive,
FullFilePath = "/manga/detective comics #001.cbz",
@ -91,13 +91,13 @@ public class ChapterListExtensionsTests
IsSpecial = true,
Series = "detective comics",
Title = "detective comics",
Volumes = "0"
Volumes = API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume
};
var chapterList = new List<Chapter>()
{
CreateChapter("detective comics", "0", CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true),
CreateChapter("detective comics", "0", CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true)
CreateChapter("detective comics", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true),
CreateChapter("detective comics", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true)
};
var actualChapter = chapterList.GetChapterByRange(info);
@ -112,7 +112,7 @@ public class ChapterListExtensionsTests
{
var chapterList = new List<Chapter>()
{
CreateChapter("darker than black", "0", CreateFile("/manga/darker than black.cbz", MangaFormat.Archive), true),
CreateChapter("darker than black", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/darker than black.cbz", MangaFormat.Archive), true),
CreateChapter("darker than black", "1", CreateFile("/manga/darker than black.cbz", MangaFormat.Archive), false),
};
@ -124,7 +124,7 @@ public class ChapterListExtensionsTests
{
var chapterList = new List<Chapter>()
{
CreateChapter("darker than black", "0", CreateFile("/manga/darker than black.cbz", MangaFormat.Archive), true),
CreateChapter("darker than black", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/darker than black.cbz", MangaFormat.Archive), true),
CreateChapter("darker than black", "1", CreateFile("/manga/darker than black.cbz", MangaFormat.Archive), false),
};
@ -151,8 +151,8 @@ public class ChapterListExtensionsTests
{
var chapterList = new List<Chapter>()
{
CreateChapter("detective comics", "0", CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true),
CreateChapter("detective comics", "0", CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true)
CreateChapter("detective comics", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true),
CreateChapter("detective comics", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true)
};
chapterList[0].ReleaseDate = new DateTime(10, 1, 1);
@ -166,8 +166,8 @@ public class ChapterListExtensionsTests
{
var chapterList = new List<Chapter>()
{
CreateChapter("detective comics", "0", CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true),
CreateChapter("detective comics", "0", CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true)
CreateChapter("detective comics", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true),
CreateChapter("detective comics", API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter, CreateFile("/manga/detective comics #001.cbz", MangaFormat.Archive), true)
};
chapterList[0].ReleaseDate = new DateTime(2002, 1, 1);

View file

@ -17,8 +17,8 @@ public class SeriesExtensionsTests
{
var series = new SeriesBuilder("Test 1")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder("0")
.WithName(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithCoverImage("Special 1")
.WithIsSpecial(true)
@ -43,8 +43,8 @@ public class SeriesExtensionsTests
{
var series = new SeriesBuilder("Test 1")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("13")
.WithCoverImage("Chapter 13")
.Build())
@ -59,7 +59,7 @@ public class SeriesExtensionsTests
.WithVolume(new VolumeBuilder("2")
.WithName("Volume 2")
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithCoverImage("Volume 2")
.Build())
.Build())
@ -81,14 +81,14 @@ public class SeriesExtensionsTests
.WithVolume(new VolumeBuilder("1")
.WithName("Volume 1")
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithCoverImage("Volume 1 Chapter 1")
.Build())
.Build())
.WithVolume(new VolumeBuilder("2")
.WithName("Volume 2")
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithCoverImage("Volume 2")
.Build())
.Build())
@ -120,8 +120,8 @@ public class SeriesExtensionsTests
{
var series = new SeriesBuilder("Test 1")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder("0")
.WithName(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("2.5")
.WithIsSpecial(false)
.WithCoverImage("Special 1")
@ -146,8 +146,8 @@ public class SeriesExtensionsTests
{
var series = new SeriesBuilder("Test 1")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder("0")
.WithName(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("2.5")
.WithIsSpecial(false)
.WithCoverImage("Chapter 2.5")
@ -156,7 +156,7 @@ public class SeriesExtensionsTests
.WithIsSpecial(false)
.WithCoverImage("Chapter 2")
.Build())
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(true)
.WithCoverImage("Special 1")
.Build())
@ -176,8 +176,8 @@ public class SeriesExtensionsTests
{
var series = new SeriesBuilder("Test 1")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder("0")
.WithName(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("2.5")
.WithIsSpecial(false)
.WithCoverImage("Chapter 2.5")
@ -186,14 +186,14 @@ public class SeriesExtensionsTests
.WithIsSpecial(false)
.WithCoverImage("Chapter 2")
.Build())
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(true)
.WithCoverImage("Special 3")
.Build())
.Build())
.WithVolume(new VolumeBuilder("1")
.WithMinNumber(1)
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(false)
.WithCoverImage("Volume 1")
.Build())
@ -213,8 +213,8 @@ public class SeriesExtensionsTests
{
var series = new SeriesBuilder("Test 1")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder("0")
.WithName(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("2.5")
.WithIsSpecial(false)
.WithCoverImage("Chapter 2.5")
@ -223,14 +223,14 @@ public class SeriesExtensionsTests
.WithIsSpecial(false)
.WithCoverImage("Chapter 2")
.Build())
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(true)
.WithCoverImage("Special 1")
.Build())
.Build())
.WithVolume(new VolumeBuilder("1")
.WithMinNumber(1)
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(false)
.WithCoverImage("Volume 1")
.Build())
@ -250,8 +250,8 @@ public class SeriesExtensionsTests
{
var series = new SeriesBuilder("Ippo")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder("0")
.WithName(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("1426")
.WithIsSpecial(false)
.WithCoverImage("Chapter 1426")
@ -260,21 +260,21 @@ public class SeriesExtensionsTests
.WithIsSpecial(false)
.WithCoverImage("Chapter 1425")
.Build())
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(true)
.WithCoverImage("Special 1")
.Build())
.Build())
.WithVolume(new VolumeBuilder("1")
.WithMinNumber(1)
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(false)
.WithCoverImage("Volume 1")
.Build())
.Build())
.WithVolume(new VolumeBuilder("137")
.WithMinNumber(1)
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(false)
.WithCoverImage("Volume 137")
.Build())
@ -294,8 +294,8 @@ public class SeriesExtensionsTests
{
var series = new SeriesBuilder("Test 1")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder("0")
.WithName(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithName(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("2.5")
.WithIsSpecial(false)
.WithCoverImage("Chapter 2.5")
@ -307,7 +307,7 @@ public class SeriesExtensionsTests
.Build())
.WithVolume(new VolumeBuilder("4")
.WithMinNumber(4)
.WithChapter(new ChapterBuilder("0")
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter)
.WithIsSpecial(false)
.WithCoverImage("Volume 4")
.Build())

View file

@ -21,7 +21,7 @@ public class VolumeListExtensionsTests
.WithChapter(new ChapterBuilder("3").Build())
.WithChapter(new ChapterBuilder("4").Build())
.Build(),
new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("1").Build())
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter).WithIsSpecial(true).Build())
.Build(),
@ -39,7 +39,7 @@ public class VolumeListExtensionsTests
.WithChapter(new ChapterBuilder("3").Build())
.WithChapter(new ChapterBuilder("4").Build())
.Build(),
new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("1").Build())
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter).WithIsSpecial(true).Build())
.Build(),
@ -57,7 +57,7 @@ public class VolumeListExtensionsTests
.WithChapter(new ChapterBuilder("3").Build())
.WithChapter(new ChapterBuilder("4").Build())
.Build(),
new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("1").Build())
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter).WithIsSpecial(true).Build())
.Build(),
@ -75,7 +75,7 @@ public class VolumeListExtensionsTests
.WithChapter(new ChapterBuilder("3").Build())
.WithChapter(new ChapterBuilder("4").Build())
.Build(),
new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.LooseLeafVolume)
.WithChapter(new ChapterBuilder("1").Build())
.WithChapter(new ChapterBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultChapter).WithIsSpecial(true).Build())
.Build(),