Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4.2 Release #351

Merged
merged 154 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
d66cd37
Fix directory issue when building all the packages where directory go…
majora2007 Mar 24, 2021
795c80b
Bump version for patch release due to bug in continue fuctionality. (…
majora2007 Mar 25, 2021
609eda3
Chore/version bump (#106)
majora2007 Mar 25, 2021
3556dfc
Updated readme to have an image and support link. (#107)
majora2007 Mar 25, 2021
d2914a0
Feature/readme (#109)
majora2007 Mar 25, 2021
280fdc0
Fixed a bug where if a chapter had multiple archive files, they would…
majora2007 Mar 26, 2021
55d47eb
Bugfix/multiple file extract (#116)
majora2007 Mar 27, 2021
7e54d33
Comic Support (#119)
majora2007 Mar 28, 2021
c74b4c3
More cases for parsing regex
majora2007 Mar 28, 2021
3e031ab
Lots of Parsing Enhancements (#120)
majora2007 Mar 28, 2021
d9246b7
Parsing Enhancements (#126)
majora2007 Mar 29, 2021
b709da3
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Mar 29, 2021
a0deafe
Parser Enhancement: Fallback to Folder name (#129)
majora2007 Mar 29, 2021
c6a83b1
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Mar 29, 2021
935bb83
Update README.md
majora2007 Mar 30, 2021
f518da3
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Mar 30, 2021
3aac081
Update README.md (#130)
majora2007 Mar 30, 2021
237542b
Special Grouping (#134)
majora2007 Mar 31, 2021
b36377a
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Mar 31, 2021
667d1d2
Don't go to archive file if it hasn't updated since last scan (#135)
majora2007 Mar 31, 2021
a859e3e
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Mar 31, 2021
ca5c666
In Progress Activity Stream Fixes (#136)
majora2007 Mar 31, 2021
480c990
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Mar 31, 2021
7d54923
Fixed a bug where chapter cover images weren't being updated due to a…
majora2007 Apr 1, 2021
876466d
Removed a piece of code that was needed for upgrading, since all beta…
majora2007 Apr 1, 2021
1f5d1ec
Fixed InProgress to properly respect order and show more recent activ…
majora2007 Apr 1, 2021
13132c2
Updated dependencies to lastest stable.
majora2007 Apr 1, 2021
71d3af5
LastModified on Volumes wasn't updating, validated it does update whe…
majora2007 Apr 1, 2021
7790cf3
In Progress Query Update (#145)
majora2007 Apr 1, 2021
d3c1486
Performance, Scan Loop, Specials, and cleanup (#150)
majora2007 Apr 5, 2021
5c59b52
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Apr 5, 2021
b3ec8e8
Bugfixes! (#157)
majora2007 Apr 6, 2021
f43b973
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Apr 6, 2021
bd89ba3
Version bump
majora2007 Apr 6, 2021
32bd5d6
I keep fixing this but it keeps reverting (#158)
majora2007 Apr 6, 2021
9e5bcb8
Fixed #165 - Login and Registration will allow case-insensitive usern…
majora2007 Apr 11, 2021
6ba0047
Cover Image - First and tests (#170)
majora2007 Apr 11, 2021
d59d60d
Feature/unit tests (#171)
majora2007 Apr 13, 2021
09a953b
Feature/bugfix and regex (#174)
majora2007 Apr 13, 2021
2b99c8a
Scan Bugfixes (#177)
majora2007 Apr 16, 2021
a01613f
EPUB Support (#178)
majora2007 Apr 28, 2021
35a47f5
Book Feedback and small bugs (#183)
majora2007 Apr 29, 2021
6d74215
Feature/feedback (#185)
majora2007 Apr 30, 2021
e2e7551
Book Feedback (#190)
majora2007 May 2, 2021
9c43833
Bugfixes/misc (#196)
majora2007 May 3, 2021
2be1630
Tap to Paginate User Pref (#197)
majora2007 May 4, 2021
d92e9e7
Implemented the ability to move between volumes (reading) automatical…
majora2007 May 5, 2021
f694145
Feature/tech debt (#199)
majora2007 May 6, 2021
ef2d88a
Updated Readme for recruitment
majora2007 May 6, 2021
e37931b
Regex addition (#200)
majora2007 May 6, 2021
55b11e0
Merge branch 'main' of https://github.com/Kareadita/Kavita into develop
majora2007 May 8, 2021
8b1fbc0
Implemented Dark Mode (#203)
majora2007 May 9, 2021
ecc399b
Fixed #204. Raised max password to 32 characters (#205)
majora2007 May 9, 2021
6fc5e53
Fixed #206 (#207)
majora2007 May 10, 2021
c8adaee
Sentry Integration (#212)
majora2007 May 11, 2021
beca4a4
Bugfix/parser (#214)
majora2007 May 11, 2021
98e8b72
Tell sentry to ignore some noisy messages, add a bounds check on an A…
majora2007 May 13, 2021
03b49a5
Implemented the ability to change the JWT key on runtime. (#217)
majora2007 May 14, 2021
d1a7a4f
Reverted a NPE check to better support reflection method
majora2007 May 14, 2021
2f793af
More regex! Bonus is now a keyword for specials (#220)
majora2007 May 16, 2021
308e2b4
Bugfixes (#221)
majora2007 May 16, 2021
77c5271
MinimumNumberFromRange exception (#222)
majora2007 May 17, 2021
7b02ddf
Added Dockerfiles to main repo (#225)
Kizaing May 19, 2021
54878b1
Updated README with Docker instructions (#226)
Kizaing May 19, 2021
fdc9258
Bugfix: Flatten wasn't consistent (#227)
majora2007 May 20, 2021
a0d0f6d
Fixed #224. Sort before getting a First?Last() chatper
majora2007 May 19, 2021
50af2f8
Fixed #224. Sort before getting a First?Last() chatper (#228)
majora2007 May 20, 2021
68268f5
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 May 20, 2021
f7e071d
More build flavors for Raspberry Pi users and updated Install since w…
majora2007 May 19, 2021
3c375da
Bugfix/appsettings (#229)
majora2007 May 20, 2021
5784bad
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 May 20, 2021
d7d7f9b
Collection Support (#234)
majora2007 May 30, 2021
7e976a1
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 May 31, 2021
0a39a17
TokenKey Generation (#235)
majora2007 May 31, 2021
b0b371c
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 May 31, 2021
aaad82c
Reduce Unauthenticated Errors in Sentry (#238)
majora2007 Jun 1, 2021
d3ce3d9
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Jun 1, 2021
ce35c4f
CB7 Support (#241)
majora2007 Jun 1, 2021
a025225
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Jun 1, 2021
5083608
Bugfix/sentry and fixes (#243)
majora2007 Jun 2, 2021
215dbde
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Jun 2, 2021
6c67f73
Chore/docker build (#245)
majora2007 Jun 2, 2021
16d6b26
fix: wrong password length validation when registering a new user or …
leo2d Jun 3, 2021
863bc57
Docker Build Turn off (#248)
majora2007 Jun 3, 2021
ec03272
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Jun 3, 2021
03c9b7a
Added book reader reading direction preference (#249)
majora2007 Jun 3, 2021
b38ea81
fix: error when resetting password of a non admin user (#252)
leo2d Jun 3, 2021
c12879c
feat: remove Webtoon option from Library Types (#254)
leo2d Jun 3, 2021
4910f1d
Book Reading Progress Enhancement (#259)
majora2007 Jun 3, 2021
e6cfa4f
Bugfix/anchor rewriting (#260)
majora2007 Jun 3, 2021
606e4c8
Recently Added Page (#261)
therobbiedavis Jun 4, 2021
aa74391
Don't log exceptions to Sentry when debugging locally. Fixed a constr…
majora2007 Jun 4, 2021
8211f1c
Set Version to v0.4.0
majora2007 Jun 5, 2021
8175ddf
Fixed a critical crash in Scan library where Series Metadata was gett…
majora2007 Jun 5, 2021
cdd01ee
Merged develop into main
majora2007 Jun 6, 2021
ee3cb9e
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Jun 6, 2021
f0f74e8
Fixed the constraint issue with Metadata and ensure we log parameters…
majora2007 Jun 6, 2021
e4a9c46
Version bump and reduced some sentry logs
majora2007 Jun 7, 2021
4606b54
Removed the SeriesMetadata migration since users have updated to v0.4…
majora2007 Jun 7, 2021
5259a14
Implemented the ability to configure the default port for non-docker …
majora2007 Jun 7, 2021
41a5d1b
Fixed a bug on getting next/previous chapters where if chapters were …
majora2007 Jun 7, 2021
d00cf7d
Merged Dockerfiles (#282)
Kizaing Jun 7, 2021
6f124b6
Add try catch on Parser MinimumNumberFromRange in case something weir…
majora2007 Jun 7, 2021
7dae1da
Logging Enhancements (#285)
majora2007 Jun 7, 2021
4f29cf7
Bugfix/manga reader pad zeros (#288)
therobbiedavis Jun 8, 2021
d261449
Adding releases to be sent to discord (#291)
therobbiedavis Jun 8, 2021
8d8e7ce
Book Grouping (#292)
majora2007 Jun 8, 2021
560b0c9
Feature/docker setup (#294)
Kizaing Jun 8, 2021
b61da7e
Update nightly-docker.yml (#295)
therobbiedavis Jun 8, 2021
4ae9f07
Feature/docker stable setup (#296)
Kizaing Jun 9, 2021
16a77fa
Download Support (#298)
majora2007 Jun 10, 2021
f8aba21
Removed "Anthology" from being a special parsing keyword as series ar…
majora2007 Jun 14, 2021
46b6040
Special Markers (#305)
majora2007 Jun 14, 2021
584348c
Special Marker Changes (#306)
majora2007 Jun 15, 2021
d02d2d3
Epub 3.2 Collection Tag support (#308)
majora2007 Jun 15, 2021
becf2ec
Changed how series parsing works. Now at the end of the Parse() call,…
majora2007 Jun 16, 2021
95db721
Create FUNDING.yml
majora2007 Jun 17, 2021
a9db07e
Create FUNDING.yml
majora2007 Jun 17, 2021
d2e4449
Update FUNDING.yml
majora2007 Jun 17, 2021
6e1b227
Transaction Support (#309)
majora2007 Jun 18, 2021
1036c73
When performing a download, if there is only 1 file, don't zip it and…
majora2007 Jun 18, 2021
0c88d91
Ignore .DS_Store and @eaDir folders when scanning directories. (#314)
majora2007 Jun 18, 2021
8f4d42d
Add noreferrer noopener on links to external resources for epub readi…
majora2007 Jun 20, 2021
b25335a
Single Download Failed on Epubs (#319)
majora2007 Jun 20, 2021
1c9b257
Feat/usage stats collection (#317)
leo2d Jun 20, 2021
568544f
Update FUNDING.yml
majora2007 Jun 24, 2021
b958342
Update FUNDING.yml
majora2007 Jun 24, 2021
be2b78f
Manga Redesign (#321)
majora2007 Jun 25, 2021
af8c6c2
Fixed file pathing for automated docker builds (#323)
Kizaing Jun 25, 2021
f50a21d
Hotfix/docker workflow (#324)
Kizaing Jun 25, 2021
dfddb55
Fixed build issues (#325)
majora2007 Jun 25, 2021
7f141ad
Github build actions
majora2007 Jun 25, 2021
a97bd1b
Github build actions (#326)
majora2007 Jun 25, 2021
61c8ce3
Bugfix/build 2 (#327)
majora2007 Jun 25, 2021
dfd4b1e
adding ls -l to workflow for integrity check (#328)
therobbiedavis Jun 25, 2021
9b47123
logging for dotnet ui build (#329)
therobbiedavis Jun 25, 2021
f29f2f6
Stat API Url change (#330)
majora2007 Jun 25, 2021
50bdb71
adding debugging and path change (#332)
therobbiedavis Jun 25, 2021
0533de7
Bugfix/workflow test (#333)
therobbiedavis Jun 25, 2021
acbd4ce
testing out rsync (#334)
therobbiedavis Jun 25, 2021
733460e
fixing ls (#335)
therobbiedavis Jun 25, 2021
534c2d2
Merged
majora2007 Jun 25, 2021
be56b33
Fixing workflow (#337)
therobbiedavis Jun 25, 2021
6b64573
Stats API Url Fixed (#338)
majora2007 Jun 25, 2021
d8a9a95
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Jun 25, 2021
471b49e
Update README.md
majora2007 Jun 26, 2021
b0b64cf
Added demo to readme
majora2007 Jun 26, 2021
dc68318
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Jun 26, 2021
f18285d
chapter and issue parsing for comics (#343)
therobbiedavis Jun 27, 2021
9534618
Set dark mode to true and migration (#348)
therobbiedavis Jun 30, 2021
4d41ebf
Small readme changes
majora2007 Jun 30, 2021
3231b60
Merge branch 'develop' of https://github.com/Kareadita/Kavita into de…
majora2007 Jun 30, 2021
20ba41c
api url change (#349)
therobbiedavis Jun 30, 2021
f7f9830
Hotfix/docker file permissions (#350)
Kizaing Jun 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Set line formatting for scripts

*.sh text eol=lf
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: kavita # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://paypal.me/majora2007"]
17 changes: 17 additions & 0 deletions .github/workflows/discord-release-msg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release messages to discord announcement channel

on:
release:
types:
- created

jobs:
run_main:
runs-on: ubuntu-18.04
name: Sends custom message
steps:
- name: Sending message
uses: nhevia/discord-styled-releases@main
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
79 changes: 79 additions & 0 deletions .github/workflows/nightly-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build Nightly Docker

on:
push:
branches:
- 'develop'

jobs:
docker:
runs-on: ubuntu-latest
steps:

- name: Check Out Repo
uses: actions/checkout@v2

- name: Check Out WebUI
uses: actions/checkout@v2
with:
repository: Kareadita/Kavita-webui
ref: develop
path: Kavita-webui/

- name: NodeJS to Compile WebUI
uses: actions/[email protected]
with:
node-version: '14'
- run: |

cd Kavita-webui/ || exit
echo 'Installing web dependencies'
npm install

echo 'Building UI'
npm run prod

echo 'Copying back to Kavita wwwroot'
rsync -a dist/ ../API/wwwroot/

cd ../ || exit

- name: Compile dotnet app
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- run: ./action-build.sh

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: kizaing/kavita:nightly

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

- name: Notify Discord
uses: rjstone/discord-webhook-notify@v1
with:
severity: info
description:
details: 'https://hub.docker.com/r/kizaing/kavita/tags?page=1&ordering=last_updated'
text: A new nightly build has been released for docker.
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}
79 changes: 79 additions & 0 deletions .github/workflows/stable-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build Stable Docker

on:
push:
branches:
- 'main'

jobs:
docker:
runs-on: ubuntu-latest
steps:

- name: Check Out Repo
uses: actions/checkout@v2

- name: Check Out WebUI
uses: actions/checkout@v2
with:
repository: Kareadita/Kavita-webui
ref: main
path: Kavita-webui/

- name: NodeJS to Compile WebUI
uses: actions/[email protected]
with:
node-version: '14'
- run: |

cd Kavita-webui/ || exit
echo 'Installing web dependencies'
npm install

echo 'Building UI'
npm run prod

echo 'Copying back to Kavita wwwroot'
rsync -a dist/ ../API/wwwroot/

cd ../ || exit

- name: Compile dotnet app
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- run: ./action-build.sh

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: kizaing/kavita:latest

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

- name: Notify Discord
uses: rjstone/discord-webhook-notify@v1
with:
severity: info
description:
details: 'https://hub.docker.com/r/kizaing/kavita/tags?page=1&ordering=last_updated'
text: A new stable build has been released for docker.
webhookUrl: ${{ secrets.DISCORD_DOCKER_UPDATE_URL }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -453,4 +453,5 @@ cache/
/API/cache/
/API/temp/
_temp/
_output/
_output/
stats/
8 changes: 8 additions & 0 deletions API.Tests/Comparers/NaturalSortComparerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ public class NaturalSortComparerTest
new[] {"Batman - Black white vol 1 #04.cbr", "Batman - Black white vol 1 #03.cbr", "Batman - Black white vol 1 #01.cbr", "Batman - Black white vol 1 #02.cbr"},
new[] {"Batman - Black white vol 1 #01.cbr", "Batman - Black white vol 1 #02.cbr", "Batman - Black white vol 1 #03.cbr", "Batman - Black white vol 1 #04.cbr"}
)]
[InlineData(
new[] {"3and4.cbz", "The World God Only Knows - Oneshot.cbz", "5.cbz", "1and2.cbz"},
new[] {"1and2.cbz", "3and4.cbz", "5.cbz", "The World God Only Knows - Oneshot.cbz"}
)]
[InlineData(
new[] {"Solo Leveling - c000 (v01) - p000 [Cover] [dig] [Yen Press] [LuCaZ].jpg", "Solo Leveling - c000 (v01) - p001 [dig] [Yen Press] [LuCaZ].jpg", "Solo Leveling - c000 (v01) - p002 [dig] [Yen Press] [LuCaZ].jpg", "Solo Leveling - c000 (v01) - p003 [dig] [Yen Press] [LuCaZ].jpg"},
new[] {"Solo Leveling - c000 (v01) - p000 [Cover] [dig] [Yen Press] [LuCaZ].jpg", "Solo Leveling - c000 (v01) - p001 [dig] [Yen Press] [LuCaZ].jpg", "Solo Leveling - c000 (v01) - p002 [dig] [Yen Press] [LuCaZ].jpg", "Solo Leveling - c000 (v01) - p003 [dig] [Yen Press] [LuCaZ].jpg"}
)]
public void TestNaturalSortComparer(string[] input, string[] expected)
{
Array.Sort(input, _nc);
Expand Down
3 changes: 2 additions & 1 deletion API.Tests/Extensions/SeriesExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public void NameInListTest(string[] seriesInput, string[] list, bool expected)
Name = seriesInput[0],
LocalizedName = seriesInput[1],
OriginalName = seriesInput[2],
NormalizedName = seriesInput.Length == 4 ? seriesInput[3] : API.Parser.Parser.Normalize(seriesInput[0])
NormalizedName = seriesInput.Length == 4 ? seriesInput[3] : API.Parser.Parser.Normalize(seriesInput[0]),
Metadata = new SeriesMetadata()
};

Assert.Equal(expected, series.NameInList(list));
Expand Down
23 changes: 22 additions & 1 deletion API.Tests/Helpers/EntityFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public static Series CreateSeries(string name)
SortName = name,
LocalizedName = name,
NormalizedName = API.Parser.Parser.Normalize(name),
Volumes = new List<Volume>()
Volumes = new List<Volume>(),
Metadata = new SeriesMetadata()
};
}

Expand Down Expand Up @@ -53,5 +54,25 @@ public static MangaFile CreateMangaFile(string filename, MangaFormat format, int
Pages = pages
};
}

public static SeriesMetadata CreateSeriesMetadata(ICollection<CollectionTag> collectionTags)
{
return new SeriesMetadata()
{
CollectionTags = collectionTags
};
}

public static CollectionTag CreateCollectionTag(int id, string title, string summary, bool promoted)
{
return new CollectionTag()
{
Id = id,
NormalizedTitle = API.Parser.Parser.Normalize(title).ToUpper(),
Title = title,
Summary = summary,
Promoted = promoted
};
}
}
}
4 changes: 4 additions & 0 deletions API.Tests/Parser/ComicParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class ComicParserTests
[InlineData("Scott Pilgrim 02 - Scott Pilgrim vs. The World (2005)", "Scott Pilgrim")]
[InlineData("Wolverine - Origins 003 (2006) (digital) (Minutemen-PhD)", "Wolverine - Origins")]
[InlineData("Invincible Vol 01 Family matters (2005) (Digital).cbr", "Invincible")]
[InlineData("Amazing Man Comics chapter 25", "Amazing Man Comics")]
[InlineData("Amazing Man Comics issue #25", "Amazing Man Comics")]
public void ParseComicSeriesTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseComicSeries(filename));
Expand All @@ -40,6 +42,7 @@ public void ParseComicSeriesTest(string filename, string expected)
[InlineData("Teen Titans v1 001 (1966-02) (digital) (OkC.O.M.P.U.T.O.-Novus)", "1")]
[InlineData("Scott Pilgrim 02 - Scott Pilgrim vs. The World (2005)", "2")]
[InlineData("Superman v1 024 (09-10 1943)", "1")]
[InlineData("Amazing Man Comics chapter 25", "0")]
public void ParseComicVolumeTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseComicVolume(filename));
Expand All @@ -61,6 +64,7 @@ public void ParseComicVolumeTest(string filename, string expected)
[InlineData("Teen Titans v1 001 (1966-02) (digital) (OkC.O.M.P.U.T.O.-Novus)", "1")]
[InlineData("Superman v1 024 (09-10 1943)", "24")]
[InlineData("Invincible 070.5 - Invincible Returns 1 (2010) (digital) (Minutemen-InnerDemons).cbr", "70.5")]
[InlineData("Amazing Man Comics chapter 25", "25")]
public void ParseComicChapterTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseComicChapter(filename));
Expand Down
24 changes: 22 additions & 2 deletions API.Tests/Parser/MangaParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ public MangaParserTests(ITestOutputHelper testOutputHelper)
[InlineData("Kedouin Makoto - Corpse Party Musume, Chapter 12 [Dametrans][v2]", "0")]
[InlineData("Vagabond_v03", "3")]
[InlineData("Mujaki No Rakune Volume 10.cbz", "10")]
[InlineData("Umineko no Naku Koro ni - Episode 3 - Banquet of the Golden Witch #02.cbz", "3")]
[InlineData("Umineko no Naku Koro ni - Episode 3 - Banquet of the Golden Witch #02.cbz", "0")]
[InlineData("Volume 12 - Janken Boy is Coming!.cbz", "12")]
[InlineData("[dmntsf.net] One Piece - Digital Colored Comics Vol. 20 Ch. 177 - 30 Million vs 81 Million.cbz", "20")]
[InlineData("Gantz.V26.cbz", "26")]
[InlineData("NEEDLESS_Vol.4_-Simeon_6_v2[SugoiSugoi].rar", "4")]
[InlineData("[Hidoi]_Amaenaideyo_MS_vol01_chp02.rar", "1")]
[InlineData("NEEDLESS_Vol.4_-_Simeon_6_v2_[SugoiSugoi].rar", "4")]
[InlineData("Okusama wa Shougakusei c003 (v01) [bokuwaNEET]", "1")]

[InlineData("Sword Art Online Vol 10 - Alicization Running [Yen Press] [LuCaZ] {r2}.epub", "10")]
[InlineData("Noblesse - Episode 406 (52 Pages).7z", "0")]
[InlineData("X-Men v1 #201 (September 2007).cbz", "1")]
public void ParseVolumeTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseVolume(filename));
Expand Down Expand Up @@ -137,6 +139,13 @@ public void ParseVolumeTest(string filename, string expected)
[InlineData("Okusama wa Shougakusei c003 (v01) [bokuwaNEET]", "Okusama wa Shougakusei")]
[InlineData("VanDread-v01-c001[MD].zip", "VanDread")]
[InlineData("Momo The Blood Taker - Chapter 027 Violent Emotion.cbz", "Momo The Blood Taker")]
[InlineData("Kiss x Sis - Ch.15 - The Angst of a 15 Year Old Boy.cbz", "Kiss x Sis")]
[InlineData("Green Worldz - Chapter 112 Final Chapter (End).cbz", "Green Worldz")]
[InlineData("Noblesse - Episode 406 (52 Pages).7z", "Noblesse")]
[InlineData("X-Men v1 #201 (September 2007).cbz", "X-Men")]
[InlineData("Kodoja #001 (March 2016)", "Kodoja")]
[InlineData("Boku No Kokoro No Yabai Yatsu - Chapter 054 I Prayed At The Shrine (V0).cbz", "Boku No Kokoro No Yabai Yatsu")]
[InlineData("Kiss x Sis - Ch.36 - A Cold Home Visit.cbz", "Kiss x Sis")]
public void ParseSeriesTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseSeries(filename));
Expand Down Expand Up @@ -197,6 +206,13 @@ public void ParseSeriesTest(string filename, string expected)
[InlineData("Kiss x Sis - Ch.00 - Let's Start from 0.cbz", "0")]
[InlineData("[Hidoi]_Amaenaideyo_MS_vol01_chp02.rar", "2")]
[InlineData("Okusama wa Shougakusei c003 (v01) [bokuwaNEET]", "3")]
[InlineData("Kiss x Sis - Ch.15 - The Angst of a 15 Year Old Boy.cbz", "15")]
[InlineData("Tomogui Kyoushitsu - Chapter 006 Game 005 - Fingernails On Right Hand (Part 002).cbz", "6")]
[InlineData("Noblesse - Episode 406 (52 Pages).7z", "406")]
[InlineData("X-Men v1 #201 (September 2007).cbz", "201")]
[InlineData("Kodoja #001 (March 2016)", "1")]
[InlineData("Noblesse - Episode 429 (74 Pages).7z", "429")]
[InlineData("Boku No Kokoro No Yabai Yatsu - Chapter 054 I Prayed At The Shrine (V0).cbz", "54")]
public void ParseChaptersTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseChapter(filename));
Expand Down Expand Up @@ -225,6 +241,10 @@ public void ParseEditionTest(string input, string expected)
[InlineData("Corpse Party -The Anthology- Sachikos game of love Hysteric Birthday 2U Extra Chapter", true)]
[InlineData("Ani-Hina Art Collection.cbz", true)]
[InlineData("Gifting The Wonderful World With Blessings! - 3 Side Stories [yuNS][Unknown]", true)]
[InlineData("A Town Where You Live - Bonus Chapter.zip", true)]
[InlineData("Yuki Merry - 4-Komga Anthology", false)]
[InlineData("Beastars - SP01", false)]
[InlineData("Beastars SP01", false)]
public void ParseMangaSpecialTest(string input, bool expected)
{
Assert.Equal(expected, !string.IsNullOrEmpty(API.Parser.Parser.ParseMangaSpecial(input)));
Expand Down
12 changes: 12 additions & 0 deletions API.Tests/Parser/ParserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ namespace API.Tests.Parser
{
public class ParserTests
{

[Theory]
[InlineData("Beastars - SP01", true)]
[InlineData("Beastars SP01", true)]
[InlineData("Beastars Special 01", false)]
[InlineData("Beastars Extra 01", false)]
public void HasSpecialTest(string input, bool expected)
{
Assert.Equal(expected, HasSpecialMarker(input));
}

[Theory]
[InlineData("0001", "1")]
Expand Down Expand Up @@ -121,6 +131,8 @@ public void IsEpubTest(string input, bool expected)
[InlineData("18-04", 4)]
[InlineData("18-04.5", 4.5)]
[InlineData("40", 40)]
[InlineData("40a-040b", 0)]
[InlineData("40.1_a", 0)]
public void MinimumNumberFromRangeTest(string input, float expected)
{
Assert.Equal(expected, MinimumNumberFromRange(input));
Expand Down
Loading