Commit Graph

906 Commits

Author SHA1 Message Date
Mitchell Syer
32ff58598f Merge Service Files during build to fix GraalJS (#1242) 2025-01-22 13:32:01 -05:00
robo
b14d28c406 new icons (#1222)
Co-authored-by: Robonau <30987265+Robonau@users.noreply.github>
2025-01-09 09:02:37 -05:00
schroda
1d1535dc55 Send dequeue download mutation response (#1218)
Response was never sent due to incorrect updates filter condition
2025-01-01 21:26:01 -05:00
schroda
de942440e3 Handle missing track search results on bind (#1196)
It's possible that a manga is bound to a tracker while there is no search result.
This happens when e.g. restoring a backup which includes track bindings for which there was never a tracker search.

In that case when trying to e.g. copy the binding to another manga, the mutation would fail due to not finding a search result.
These cases can be handled by additionally checking the TrackRecordTable to get the necessary track info.
2024-12-10 19:50:16 -05:00
Mitchell Syer
2e3af25dd4 Fix usage of deprecated functions (#1192)
* Fix usage of deprecated functions

* lint

* Lint

* Another
2024-12-07 23:56:42 -05:00
schroda
1d541a30ae Feature/update to exposed v0.57.0 (#1150)
* Update to exposed-migrations v3.5.0

* Update to kotlin-logging v7.0.0

* Update to exposed v0.46.0

* Update to exposed v0.47.0

* Update to exposed v0.55.0

* Update to exposed v0.56.0

* Update to exposed v0.57.0
2024-12-07 23:49:11 -05:00
renovate[bot]
2111232f42 Update kotlin monorepo to v2.1.0 (#1170)
* Update kotlin monorepo to v2.1.0

* Fix build warnings

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2024-12-07 14:27:47 -05:00
Mitchell Syer
088552bf56 Fix Deprecation Warnings (#1187) 2024-12-07 14:13:06 -05:00
Mitchell Syer
3eabbc9770 Manually update GraphQL-Java to fix subscription data loaders (#1186) 2024-12-07 14:12:56 -05:00
are-are-are
372b56bb1b add manga description (#1165) 2024-11-23 18:22:21 -05:00
schroda
3325a36cae Allow cors with credentials (#1163)
"anyHost" is not allowed in combination with "Access-Control-Allow-Credentials" (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#sect2).
At least the default webUI always includes credentials which causes a cors policy violation
2024-11-22 20:00:25 -05:00
schroda
38673bbff4 Handle missing credentials as being invalid (#1164)
In case the credentials were missing the basic authentication was just bypassed
2024-11-22 20:00:16 -05:00
Mitchell Syer
fb51834153 Fix RealUrl (#1162) 2024-11-20 22:57:42 -05:00
schroda
53c61bcb17 Serve webui on all unmatched routes (#1156)
with "/root" only "http:localhost:4567" opened the webui all other endpoints resulted in "Endpoint GET /endpoint not found"
2024-11-17 21:11:40 -05:00
schroda
6951b4b20d Remove "grapqhl log level" setting (#1155)
internal logging was removed with graphql-java v22.0
2024-11-17 21:11:26 -05:00
renovate[bot]
9cd8cb3d54 Update dependency io.javalin:javalin to v6 (#1152)
* Update dependency io.javalin:javalin to v6

* Simple compile fixes

* Simple compile fixes pass 2

* Add results to futures

* Setup jetty server and api routes

* Setup Cors

* Setup basic auth

* Documentation stubs

* Replace chapter mutex cache

* Fix compile

* Disable Jetty Logging

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2024-11-17 15:00:53 -05:00
renovate[bot]
065aa19e9e Update graphqlkotlin to v8 (major) (#1143)
* Update graphqlkotlin to v8

* Go back to JsonMapper

* Add context to data loaders

* Compile fixes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2024-11-17 12:50:33 -05:00
schroda
320a0971b4 Fix/gql download subscription (#1137)
* Properly set download update type on exceptions

* Always send FINISHED download update to client for deprecated subscription

By the time the status was sent to the client, the finished download item was already removed from the queue, causing the client to never get the latest status, thus, having an outdated cache

Regression introduced with 168b76cb0c
2024-11-15 21:30:09 -05:00
Mitchell Syer
9a51472726 Update Titles from the Source (#1115)
* Update Titles from the source

* Properly keep null fields
2024-11-14 18:08:31 -05:00
Mitchell Syer
0670f298cd Switch from Kodein to Koin (#1112)
* Switch from Kodein to Koin

* Ktlint
2024-11-14 18:08:19 -05:00
schroda
aa1e98544b Fix/invalid server settings gql mutation request (#1092)
* Validate setting values on mutation

* Handle invalid negative setting values

* Ensure at least one source is downloading at all times

* Prevent possible IllegalArgumentException

The "serverConfig.maxSourcesInParallel" value could have changed after the if-condition
2024-11-14 18:08:07 -05:00
schroda
168b76cb0c Feature/graphql download queue subscription send only updates (#1011)
* Emit only download changes instead of full status

The download subscription emitted the full download status, which, depending on how big the queue was, took forever because the graphql subscription does not support data loader batching, causing it to run into the n+1 problem

* Rename "DownloadManager#status" to "DownloadManager#updates"

* Add initial queue to download subscription type

Adds the current queue at the time of sending the initial message.
This field is null for all following messages after the initial one

* Optionally limit and omit download updates

To prevent the n+1 dataloader issue, the max number of updates included in the download subscription can be limited.
This way, the problem will be circumvented and instead, the latest download status should be (re-)fetched via the download status query, which does not run into this problem.

* Formatting
2024-11-14 18:07:14 -05:00
schroda
f5680c6d69 Switch to Koin from Injekt (#1109)
replace "com.github.inorichi.injekt" with "com.github.null2264:injekt-koin"
2024-11-09 11:32:51 -05:00
Mitchell Syer
654a3cc7ed Use Backup.serializer() (#1088) 2024-09-16 21:18:01 -04:00
Mitchell Syer
841cdc474f Remove Broken Sources and Broken History (#1084) 2024-09-15 00:19:47 -04:00
schroda
0adbea3a43 Remove manga artist, author length limit (#1080) 2024-09-15 00:10:23 -04:00
schroda
e12bada052 Use correct sync id (#1079) 2024-09-15 00:10:08 -04:00
Antoine Aflalo
df1cc2b8e9 fix(flaresolverr): fix cookie expiry for flaresolverr (#1070)
Cookie expiry is returned in seconds, the persistent cache expect it in miliseconds. Cookie is always considered as expired
2024-09-14 09:04:49 -04:00
renovate[bot]
dae55ca386 Update graphqlkotlin to v6.8.5 (#1064)
* Update graphqlkotlin to v6.8.5

* Replace Jackson with Kotlinx.Serialization where possible

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2024-09-14 09:03:53 -04:00
Syer10
6c1fbfa63b [skip ci] Formatting 2024-09-03 21:37:18 -04:00
Syer10
fb045c501a Update Kotlin to 2.0.20 2024-09-02 21:25:01 -04:00
schroda
414972d545 Feature/update log file rotation (#1023)
* Keep up to 31 log files

On average one log file per day gets created, thus, increasing to 31 files will store log files for one month

* Decrease total log files size to 100mb

* Make log appender settings configurable
2024-08-31 18:55:26 -04:00
Antoine Aflalo
9a74ae5844 feat(comicinfo): add date fields to comic info (#1021)
* feat(comicinfo): add date fields to comic info

This will be parsed by Komga, Kavita etc ... and any other library management to also have the date of the chapter.

* refactor: improve code readability

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2024-08-31 18:55:13 -04:00
Antoine Aflalo
301980ab14 fix(flaresolverr): support possible rewrite flaresolverr (#1020)
This PR:
https://github.com/FlareSolverr/FlareSolverr/pull/1300

Solve a lot of issue with not solving challenge, however, the cookie don't have path, httpOnly, secure and sameSite.

By making them optional that should work for both version of flaresolverr.
2024-08-31 18:55:02 -04:00
schroda
5dced82e5a Fix/missed automated task execution failure crashes server on startup (#1019)
* Catch automated backup task errors

* Catch automated udpate task errors

* Catch automated webui update task errors
2024-08-31 18:54:51 -04:00
schroda
9a1e4df408 Fix/server startup blocked by synchronous tasks (#1018)
* Launch missed auto backup task in background

* Launch missed auto global update task in background

* Launch missed auto webui update check task in background
2024-08-31 18:54:41 -04:00
schroda
5b08b81239 Initialize manga on add to library (#1016)
In case a manga gets added to the library which has not been initialized yet, it should be tried to initialize it.
Since it's not an error to have uninitialized manga in the library, this can be done in the background via the updater and the client receives the updated data via the update subscription.
2024-08-31 18:54:30 -04:00
schroda
7fac538ba3 Initialize uninitialized manga during global update (#1015)
They were only initialized in case the setting to refresh manga metadata during an update was enabled.
However, this should always be done for uninitialized manga, regardless of the setting.

06bfc33e72 prevents uninitialized manga from getting filtered out, however, it did not ensure to initialize the manga
2024-08-31 18:54:18 -04:00
schroda
ef6be74ec2 Fix/chapter downloaded check (#1012)
* Properly check for first page in cbz files

The download check for cbz files only checked if the archive existed but didn't check for the first page

* Streamline getImageImpl of ChapterDownloadProviders

* Exclude comic info file from page list

In case the download folder did not contain any page files, only the comic info file existed, which caused the download check to incorrectly detect the first page

* Add logging to ChapterForDownload#asDownloadReady
2024-08-31 18:54:06 -04:00
schroda
b7b733f351 [skip ci] Feature/update readme (#1005)
* Replace tachiyomi with mihon

* Update "syncing with mihon" readme section

* Update graphql section in CONTRIBUTING.md
2024-08-17 20:10:47 -04:00
schroda
06bfc33e72 Always update uninitialized manga in global update (#997)
Manga can be added to the library while they have not been initialized yet.
In this case, depending on the manga exclusion setting, they will never be updated automatically unless they get refreshed once manually.
2024-07-28 15:58:23 -04:00
schroda
fbcd55d6c5 Add "hasDuplicatedChapters" field to gql MangaType (#995) 2024-07-28 15:58:12 -04:00
schroda
2484b5f14b Fix/downloaded chapters with lost page count (#994)
* Persist page count during chapter list update

In case a downloaded chapter gets deleted during a chapter list update, the download status was tried to be preserved.
However, in case the status could be preserved, the page count was lost and thus, the chapter now was marked as downloaded with a page count of -1.

* Mark downloaded chapters without page count as not downloaded
2024-07-28 15:58:01 -04:00
schroda
6982659658 Fix/inserting duplicated chapters into database (#991)
* Prevent adding duplicated chapters into the db

it's possible that the source returns a list containing chapters with the same url
once such duplicated chapters have been added, they aren't being removed anymore as long as there is
a chapter with the same url in the fetched chapter list, even if the duplicated chapter itself
does not exist anymore on the source

* Drop duplicated chapters from database table

* Add unique constraint to chapter table

This is to completely prevent duplicated chapters from being added to the database.
Since once a duplicated chapter has been added to the database, it does not get removed anymore as long as a chapter with the same url is included in the requested source chapter list
2024-07-28 15:57:50 -04:00
AeonLucid
9e006166a8 Add setting to use the flaresolverr response (#990) 2024-07-28 15:57:40 -04:00
AeonLucid
25a62e33a1 Fix PersistentCookieStore for domains with an underscore (#989)
* Fix PersistentCookieStore for domains with an underscore

* Missed one uri
2024-07-28 15:57:30 -04:00
AeonLucid
d05ed0a56c Fix SOCKS5 authentication by setting a default Authenticator (#988)
* Fix SOCKS5 authentication by setting a default Authenticator

* Fix lint
2024-07-28 15:57:17 -04:00
schroda
eaffb2755c Cleanup only created auto backup files (#984)
The automated backup cleanup just deleted every file (recursively in subfolders as well) in the set folder in case it was older than the set backup ttl.
This made it impossible to save the automated backups into a folder with different files.
2024-06-29 11:44:03 -04:00
schroda
e0fcae2ae3 Handle deprecated gql sort again (#983) 2024-06-28 09:21:32 -04:00
schroda
af9ad61174 Feature/gql simpilify filtering for multiple values (#960)
* Remove code duplication

* Remove unnecessary functions

* Simplify filtering for multiple values in queries

Makes it easier to filter for multiple values at ones without having to nest filters with multiple "and".

e.g.

```gql
query MyQuery {
 mangas(
  filter: {genre: {includesInsensitive: "action"}, and: {genre: {includesInsensitive: "adventure"}, and: { ... }}}
 ) {
  nodes {
   id
  }
 }
}
```

can be simplified to

```gql
query MyQuery {
 mangas(
  filter: {genre: {includesInsensitive: ["action", "adventure", ...]}}
 ) {
  nodes {
   id
  }
 }
}
```

* Add filter for matching "any" value in list

Makes it easier to filter for entries that match any value without having to nest filters with multiple "or".

e.g.

```gql
query MyQuery {
 mangas(
  filter: {genre: {includesInsensitiveAny: ["action", "adventure", ...]}}
 ) {
  nodes {
   id
  }
 }
}
```

instead of

```gql
query MyQuery {
 mangas(
  filter: {genre: {includesInsensitive: "action", or: {genre: includesInsensitive: "adventure", or: {...}}}}
 ) {
  nodes {
   id
  }
 }
}
```

* Add util function to apply "andWhere/All/Any"
2024-06-27 20:34:29 -04:00