Commit Graph

1132 Commits

Author SHA1 Message Date
Zeedif
b33069f107 fix(opds): resolve sql group by syntax error when filtering library (#2118) 2026-06-17 22:39:30 -04:00
Zeedif
14ab3aa9f4 fix(opds): handle dead sources and prevent kosync binary hash crashes (#2116) 2026-06-17 22:39:22 -04:00
Weblate (bot)
bfa0038f53 Weblate translations (#1903)
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/el/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/ja/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/pl/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/ru/
Translation: Suwayomi/Suwayomi-Server

Co-authored-by: Micka149 <dr.mischutckin2017@yandex.ru>
Co-authored-by: Philip Prescott-Decie <presdec@gmail.com>
Co-authored-by: Roland Vezsenyi <miscogd5yf2paqvxvc@farvoid.com>
Co-authored-by: Syer10 <Mitchellptbo@gmail.com>
Co-authored-by: TheRay82 <raycoc1382@gmail.com>
Co-authored-by: UnknownSkyrimPasserby <f7022961@opayq.com>
Co-authored-by: 圭紫 <kaceykoo@gmail.com>
2026-06-17 22:39:15 -04:00
Mitchell Syer
934459f15f Dataclass cleanup and minor fixes (#2115) 2026-06-15 14:32:09 -04:00
Mitchell Syer
bab58daecc Fix Postgres Backups (#2113)
* Fix Postgres Backups

* Changelog

* Import

* More accurate changelog
2026-06-15 14:31:58 -04:00
Zeedif
98576c6e62 feat(opds): Add option to skip metadata feed for direct access (#1879)
* feat(opds): add option to skip chapter metadata feed

Introduces a new server configuration `server.opdsSkipChapterMetadataFeed` (default: false).

When enabled, the OPDS chapter feed generates direct acquisition (CBZ download) and streaming (OPDS-PSE) links within the chapter list entries, bypassing the intermediate metadata subsection. This streamlines the user experience and improves compatibility with OPDS clients like KOReader that rely on direct links for automated downloading features.

* fix: lint

* fix(opds): enrich chapter data and refine sync logic for skip-metadata mode

Refines the `opdsSkipChapterMetadataFeed` implementation to ensure necessary data is available for direct links and handles synchronization logic appropriate for a list view.

- **Refactor ChapterForDownload:** Extract `refreshChapterPageList` and `updateChapterPersistence` to allow reusing page count verification logic outside the download flow.
- **Enrich Chapter Repository:** When skipping metadata, asynchronously verify page counts and calculate CBZ file sizes for chapters in the list. This ensures direct stream/download links are valid even if the chapter wasn't previously fully indexed.
- **KoSync Logic:** Implement synchronization logic in `OpdsEntryBuilder`. Since the user cannot be prompted in the chapter list view, `PROMPT` conflicts are explicitly ignored (prioritizing local progress), while updates are applied if non-conflicting.
- **OPDS Attributes:** Add `length` (file size) to acquisition links and ensure download links only appear for actually downloaded chapters.
- **Documentation:** Update `server.conf` description to clarify KoSync behavior in this mode.

* feat(download): improve chapter download filenames

* feat(opds): append language to source names

* feat(opds): handle empty chapter titles

* fix import org.jetbrains.exposed.v1.core.inList

* refactor(opds): reorganize API routes and update facet count calculations based on active filters

- **API Routing & Controllers**: Reorganize OPDS v1.2 route paths into logical groups in `OpdsAPI`. Centralize request filter extraction into `OpdsMangaFilter.fromContext`.
- **Facet Counting**: Extract `Query.applyOpdsMangaFilter` to apply active filters to facet and navigation queries. Pass the active filters to `NavigationRepository` and `MangaRepository` count queries (using `excludeField` to calculate sibling counts). This ensures category, source, language, status, and genre counts (`thr:count`) are accurately computed based on active selections.
- **Pagination**: Add pagination support to computed navigation feeds in `NavigationRepository` ( statuses and content languages).
- **Builders**: Standardize parameter ordering in `FeedBuilderInternal` and `OpdsEntryBuilder` constructors. Simplify pagination and facet link URL generation.

* fix(opds): remove redundant filter logic to avoid duplicate HAVING clauses

Resolve IllegalStateException crash caused by applying content filters twice in MangaRepository. Filtering is now handled exclusively by `applyOpdsMangaFilter`, allowing `applyMangaLibrarySort` to focus solely on ordering operations.

* revert(download): restore original CBZ filename scheme

* refactor(opds): simplify persistence updates and clean up chapter mapping

- Simplify page count and download checks in ChapterForDownload
- Clean up enriched chapter mapping in ChapterRepository to improve readability

* fix(opds): retrieve chapter archive size without leaving stream open

* perf(opds): avoid redundant DB query when refreshing chapter page list
2026-06-15 14:26:16 -04:00
schroda
8fbc8fd3d4 Fix automatic chapter downloads (#2098)
The returned result rows of the inserted chapters did not have the up-to-date "last_modified_at".
This caused "downloadNewChapters" to not be able to correctly detect unread chapters. it included the newly inserted ones, leading to exiting early due to having unread chapters.

Regression 811e15162b

fixes #2097
2026-06-08 14:21:57 -04:00
Constantin Piber
c81020dbb1 CEF: Remove jogl and jogamp deps by implementing a no-op renderer (#2095)
* CEF: Remove jogl and jogamp deps by implementing a no-op renderer

* Update readme
2026-06-08 14:21:47 -04:00
Bartu Özen
811e15162b Implement SyncYomi (#1813)
* Implement SyncYomi

* Add ability to select what to sync

* Properly fix default category bug

* Add periodic sync

* Add PostgreSQL support

* Deschedule previous task

* Check if SyncYomi is enabled in syncData function

* Don't allow multiple syncs at the same time

* Convert SyncYomiSyncService to object

* Make startSync non-suspend

* Return a result from startSync

* Sync before library update

* Improvements

* Use NetworkHelper client

* Lint

* Use measureTime

* Database improvements
- Move entire sync operation into a single transaction
- Stop loading all manga to memory

* Revert "Database improvements"

This reverts commit bee8d214c3.

* Actual database improvements

* Remove runBlocking

* Remove title check

* Update updateNonFavorites function

* Update timeout code

* Improve PostgreSQL query

* Create lastSyncState variable

* Create lastSyncStatus query

* Convert lastSyncState to StateFlow

* Create lastSyncStatusChange subscription

* Replace backupRestoreStatus with backupRestoreId

* Add startDate and endDate

* Add logs for sync start and end

* Handle all errors in syncData

* Change category restore function to match Mihon's behavior

* Fix comment

* Remove duplicate BackupMangaHandler.backup call

* Remove duplicated log

* Rename subscription to syncStatusChanged

* Use same flags for restoring

* Update syncInterval config to use DurationSetting

* Update sync scheduling logic

* Reorder conditions to reduce database calls

* Prevent deleted ghost chapters from reappearing during sync
jobobby04/TachiyomiSY#1575

* Improve sync merging categories
jobobby04/TachiyomiSY#1559

* Make columns not null

* Improve H2 triggers

* Add documentation
2026-06-05 15:31:51 -04:00
Constantin Piber
911c0ce2e3 Fix subscribeTo sometimes not emitting initial value (#2076)
* Add a test for `subscribeTo`

* subscribeTo: Fix initial flow value sometimes not propagated

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
Co-authored-by: Syer10 <mitchellptbo@gmail.com>

* lint

---------

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
Co-authored-by: Syer10 <mitchellptbo@gmail.com>
2026-05-31 17:05:09 -04:00
schroda
6493eaaa02 Fix not All/Any filters (#2064)
Both filters were inversed. `notAll` did what `notAny` was supposed to do and vise versa

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2026-05-20 20:15:45 -04:00
schroda
701e4674ea Fix gql Filter UnsupportedOperationException (#2063) 2026-05-20 20:15:18 -04:00
Constantin Piber
00861d7750 Switch to JCEF (#2038)
* Switch to JCEF

This is a full implementation, but it does not yet include downloading
CEF as KCEF did

* Download CEF automatically

* Handle and propagate CEF init errors

* Lint

* Simplify jcef version extract

* CEF: Download async

* Copy StartupAsync to support handling errors

Startup failures are simply swallowed, since they are recorded in the
future, but there is no way to get that exception

* CEF: Search for release file recursively

On Mac, the file is buried a bit deeper than first level, like on Win
and Linux

* KcefWebViewProvider: Suppress deprecation

We need to send those events, even if they are deprecated

* Update readme

* Optimize imports

* Suggestion

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

* Refactor: stick to `Path` instead of `File`

Also extracts the downloading of CEF to a separate method

* Lint

* Support disabling CEF

Co-authored-by: Kolby Moroz Liebl <31669092+kolbyml@users.noreply.github.com>

* Move JBR version to build constants

Allows embedding into Manifest so docker can later extract the proper version

* Create test to verify JCEF dependency matches downloaded JBR

* Update server/src/main/kotlin/suwayomi/tachidesk/server/util/CEFManager.kt

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

* Apply suggestions from code review

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

* Fix compile, apply Path suggestions

* Download progress

* Lint

* Fix exception on non-posix

* Delete recursively

Others can be non-empty

* Support disabling CEF at will

Not really functional, but nice

* Fix test

* Exclude masstest unless explicitly requested

* PR-CI: Run tests

* Add Changelog entry

---------

Co-authored-by: Mitchell Syer <syer10@users.noreply.github.com>
Co-authored-by: Kolby Moroz Liebl <31669092+kolbyml@users.noreply.github.com>
2026-05-19 17:05:59 -04:00
schroda
70f3036f58 Fix NullPointerException (#2056) 2026-05-19 17:05:09 -04:00
Constantin Piber
cc75ad328d Switch to LegacyMessageQueue (#2054) 2026-05-19 17:05:02 -04:00
schroda
c0618fcc5c Try to keep cached images usable on manga rename (#2052) 2026-05-18 14:17:52 -04:00
schroda
9686f75a2d Fix/losing downloads on manga rename during update (#2051)
* Fix renaming manga download dir

* Simplify manga download dir rename function

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2026-05-18 14:05:21 -04:00
schroda
4d5307f15b Fix/chapter list update preserving download state (#2050)
* Fix preserving chapter download state of deleted chapters

* Fix preserving chapter download state of updated chapters
2026-05-18 14:04:49 -04:00
Constantin Piber
779229a48a Fix tests (#2049)
* Fix test setup

* Fix tests

* Disable broken CloudflareTest

* Add a basic test for Android's Looper
2026-05-18 14:04:39 -04:00
schroda
41bb6d3dc1 Fix sorting of gql mangas query (#2043)
Regression fbb383b1f1

Broke sorting due to ordering the manga by their id first, thus, the other orderings were never applied
2026-05-16 20:16:27 -04:00
schroda
fbb383b1f1 Fix mangas query with active sorting and postgresql db (#2042)
fixes #2036
2026-05-16 19:41:37 -04:00
schroda
6870922784 Fix chapter update failure db rollback (#2040)
The deletion of chapter data was done in its own transaction. Thus, when the update or insertion failed later on, the deletion was not rolled back

fixes #2031

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2026-05-16 19:08:38 -04:00
AeonLucid
a4b647972e Add default pageCount value to fix PSQLException (#2039)
* Add default pageCount value to fix PSQLException

* Update CHANGELOG.md
2026-05-16 19:07:56 -04:00
Constantin Piber
16a14e6ac2 Pin CEF version to one known to work with KCEF (#2027)
Fixes problems like
```
java.lang.ClassNotFoundException: org.cef.callback.CefResourceReadCallback_N
```
and
```
Exception in thread "Thread-584" java.lang.NoSuchMethodError: open
```
2026-05-14 11:45:30 -04:00
Constantin Piber
a2f29ec9dc Reset update-flag on uninstall (#2025)
* Reset update-flag on uninstall

If there is an update available when the extension is uninstalled, the
table will still have the update flag, which makes no sense if it is not
installed.

Example:
```
{
  "pkgName": "eu.kanade.tachiyomi.extension.en.comix",
  "name": "Comix",
  "lang": "en",
  "versionCode": 20,
  "versionName": "1.4.20",
  "iconUrl": "/api/v1/extension/icon/tachiyomi-en.comix-v1.4.20.apk",
  "repo": "<hidden>",
  "isNsfw": true,
  "isInstalled": false,
  "isObsolete": false,
  "hasUpdate": true,
  "__typename": "ExtensionType"
},
```

* Update changelog
2026-05-14 11:44:59 -04:00
Mitchell Syer
82df985201 Crash on startup if an unrecoverable error happens (#2019)
* Crash on startup if an unrecoverable error happens

* Changelog
2026-05-14 11:44:52 -04:00
Mitchell Syer
e93efa9627 Fix Database Types as Needed (#2020) 2026-05-12 19:59:06 -04:00
Mitchell Syer
03a95e6652 Fix New Databases (#2016)
* Standardize toSqlName

* Rename Meta Key db field since KEY is now a reserved name in H2

* Changelog entry

* Use toSqlName

* Forgot this key

* Catch any exception
2026-05-12 17:22:35 -04:00
renovate[bot]
c117d380a3 Update exposed to v1 (major) (#1868)
* Update exposed to v1

* Update Exposed

* Add Kotlinx.DateTime extensions

* Update H2

* Review comments

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2026-05-12 12:53:41 -04:00
Akiaki0324
5bdb945406 fix: truncate filenames by bytes instead of characters to avoid File name too long (#1933)
* fix: truncate filenames by bytes instead of characters to avoid IOException File name too long

* add a CHANGELOG.md entry.
2026-05-10 19:02:11 -04:00
David Brochero
3064f51d25 fix: don't resuse invalidated cf_clearance cookie on CloudFlareInterceptor (#1916)
* fix: let FlareSolverr handle it's own `cf_clearance` cookie

also dedups cookies

* linting

* suggested changes

* my bad

* add to changelog
2026-05-10 19:01:51 -04:00
renovate[bot]
edf376e3dd Update graphqlkotlin to v10 alpha (major) (#1923)
* Update graphqlkotlin to v9

* Update to the v10 alpha due to nullability issues in v9

* Fixes

* Remove asDataFetcherResult

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2026-05-10 19:01:34 -04:00
Mitchell Syer
6fef27bb56 Wait until WebUI is ready to open in browser (#2010)
* Wait until WebUI is ready

* Changelog

* Move openInBrowser out of timeout
2026-05-09 18:15:43 -04:00
Mitchell Syer
505e966653 Fix Polyglot (#2011) 2026-05-09 18:15:33 -04:00
renovate[bot]
6ee3348f50 Update javalin to v7 (major) (#1920)
* Update javalin to v7

* Update Javalin usage to v7 and Jackson 3

* Import fix

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2026-05-09 14:52:00 -04:00
renovate[bot]
ec28794655 Update kotlin to v2.3.21 (#1991)
* Update kotlin to v2.3.21

* Context Parameters

* Use new format

* Lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2026-05-09 11:41:27 -04:00
schroda
0bdcf8b4ba Handle serving non-default webui with "bundled" channel (#1924)
Channel "bundled" only works with the default webui.
So force change the flavor and log a warning for information
2026-05-08 17:30:42 -04:00
Constantin Piber
76686db6a1 [#1974] Uninstall extension completely on install failure (#1975)
* [#1974] Uninstall extension completely on install failure

* Add changelog entry

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2026-05-05 10:04:50 -04:00
schroda
5cda584568 Inject html base tag directly (#1967)
Using a script to inject the base tag is unnecessarily complex as well as it is introducing an issue where the initial requests will potentially fail, due to the base tag not being injected yet.

See https://github.com/Suwayomi/Suwayomi-WebUI/issues/1096, same issue applies when a subpath is set up which can't be fixed on the client side
2026-05-02 17:21:23 -04:00
AwkwardPeak7
031890deb6 extract apk icon (#1966) 2026-05-02 17:21:13 -04:00
ItsGlassPlus1
0f149c9b33 Add JXL container format support (#1951) 2026-05-02 17:21:01 -04:00
manti
41f22df16f Singleton Protobuf (#1961) 2026-05-02 17:20:52 -04:00
David Brochero
f977d181a8 fix: default body to empty string if not present for FlareSolverr POST requests (#1915)
* fix: convert `RequestBody` to `FormBody` in FlareSolverr `POST` requests

* linting

* ref: don't convert json to form

* remove unused import
2026-02-20 20:09:34 -05:00
David Brochero
2249d237dd fix: support for POST requests on CloudflareInterceptor (#1909)
* fix: support for POST requests

Works with Flaresolverr. Required for Kagane.

Byparr is not a drop-in replacement, it just ignores the `cmd`  and interprets everything as a GET request.

* Use encodeToString instead

* linting

* Use FormBody for encoding

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

* Add missing imports

* linting, again

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2026-02-18 18:51:07 -05:00
Weblate (bot)
f18e0f4a62 Translations update from Hosted Weblate (#1845)
* Weblate translations

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Micka149 <dr.mischutckin2017@yandex.ru>
Co-authored-by: Roland Vezsenyi <miscogd5yf2paqvxvc@farvoid.com>
Co-authored-by: Syer10 <Mitchellptbo@gmail.com>
Co-authored-by: TheRay82 <raycoc1382@gmail.com>
Co-authored-by: UnknownSkyrimPasserby <f7022961@opayq.com>
Co-authored-by: 圭紫 <kaceykoo@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/ja/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/pl/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/ru/
Translation: Suwayomi/Suwayomi-Server

* Deleted translation using Weblate (Hungarian)

---------

Co-authored-by: Micka149 <dr.mischutckin2017@yandex.ru>
Co-authored-by: Roland Vezsenyi <miscogd5yf2paqvxvc@farvoid.com>
Co-authored-by: Syer10 <Mitchellptbo@gmail.com>
Co-authored-by: TheRay82 <raycoc1382@gmail.com>
Co-authored-by: UnknownSkyrimPasserby <f7022961@opayq.com>
Co-authored-by: 圭紫 <kaceykoo@gmail.com>
2026-02-14 11:38:22 -05:00
schroda
5b5e2b26f9 Fix stale manga data in library update subscription (#1889)
Regression 439e0c8284
2026-02-08 15:04:59 -05:00
schroda
f3d6bb4f22 Add mutations to update multiple metas (#1874) 2026-02-08 15:04:19 -05:00
Mitchell Syer
146290283f ChildFirstClassLoader (#1873)
* ChildFirstClassLoader

* Lint

* ChildFirstURLClassLoader

* Fix reference
2026-01-29 18:48:33 -05:00
schroda
35bcbc69a2 Fix missing PostgreSQL schema migration (#1882)
I mistakenly thought that the suwayomi schema was always being used and therefore did not think a migration for the fix b4595b70d6 was necessary.
However, this was only the case in case the username was set to suwayomi. Otherwise, the public schema was being used.
Thus, we need to migrate the data from the public schema to the suwayomi schema in these cases.
2026-01-29 18:48:24 -05:00
schroda
a58dcc6f19 Prevent subpath injection with disabled setting (#1869) 2026-01-23 11:30:29 -05:00