Commit Graph

968 Commits

Author SHA1 Message Date
Mitchell Syer
6c4c2a175b Allow using legacy database connections (#1785)
* Allow using legacy db connections

* Lint

* Description and docs
2025-11-12 16:24:41 -05:00
FadedSociety
0a7e6cce87 Remote Image Processing (#1684)
* Update ServerConfig.kt

* Update ConversionUtil.kt

* Update Page.kt

* Update ServerConfig.kt

fixed deletions caused by ide

* Update ServerConfig.kt

* Update ServerConfig.kt

* Cleanup

* Post-processing terminology

* More comments

* Lint

* Add known image mimes

* Fix weird mime set/get

* Implement different downloadConversions and serveConversions

* Lint

* Improve Post-Processing massivly

* Fix thumbnail build

* Use Array for headers

* Actually fix headers

* Actually fix headers 2

* Manually parse DownloadConversion

* Cleanup parse

* Fix write

* Update TypeName

* Optimize imports

* Remove header type

* Fix build

---------

Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2025-11-12 16:23:34 -05:00
schroda
8e405e3996 Fix/manga update of title and download folder (#1774)
* Use "move" instead of "renameTo"

* Add additional checks for download folder rename

* Log exception during manga download folder rename
2025-11-08 19:38:35 -05:00
schroda
3b21442e25 Feature/web interface manager cache requests (#1773)
* Cache webui server mapping file

* Cache webui preview version
2025-11-08 19:38:25 -05:00
schroda
dd895157c6 Throttle WebInterfaceManager requests retries (#1772) 2025-11-08 19:38:16 -05:00
schroda
436daeb87c Overwrite existing served webui files on copy (#1771)
There is a possibility that the serve folder was only partially deleted. This then could cause "FileAlreadyExistsException" when copying the webui files to the serve folder.
2025-11-08 19:38:08 -05:00
Mitchell Syer
0f95e19c76 Fix websocket token (#1766) 2025-11-06 15:26:04 -05:00
schroda
6b0fddd421 Prevent running webui auto update in parallel to the setup (#1759) 2025-11-01 14:31:13 -04:00
schroda
4dbd9d70d2 Fix/remove koreader-sync credentials from server config (#1758)
* Remove koreader-sync credentials from config

These are supposed to be set via the login/logout mutations and are not meant to be set manually by the user. Thus, they are not really settings and do not belong to the config

* Reduce log levels of KoreaderSyncService
2025-11-01 14:31:07 -04:00
schroda
53c4659044 Optionally allow basic auth fallback for chapter page endpoint (#1757)
Requesting a chapter page while having a non basic auth mode (e.g. ui login) enabled caused the basic auth prompt.
However, this is only supposed to be happen for opds
2025-11-01 14:31:01 -04:00
schroda
fb41ad38f6 Ensure webui static resources folder exists before serving it (#1756)
When the webUI got opened before the setup was completed, the missing folder caused an exception and broke the javalin server.
In that case, even after the webui setup completed, the server just returned the index.html for every path
2025-11-01 14:30:54 -04:00
Constantin Piber
2a27491f9f [#1749] Only consider path in SIMPLE_LOGIN redirect (#1751)
* [#1749] Only consider path in SIMPLE_LOGIN redirect

We don't really care about the origin, since that is implicit in
`Location` headers if not given, which sidesteps the HTTP/HTTPS issue

* Refuse non-relative redirects
2025-11-01 14:29:28 -04:00
Mitchell Syer
c9575449da Allow basic auth fallback for OPDS (#1745) 2025-10-26 12:38:02 -04:00
Constantin Piber
3e7c5e2948 Revert "Support sending floats" and convert DoubleFilter to FloatFilter (#1747)
* Revert "[#1739] Support sending floats (#1740)"

This reverts commit c1f2aae90d.

Closes #1746

* Use `DoubleFilter` for GQL interface, convert to `FloatFilter`

Closes #1739 (again)
2025-10-26 12:37:50 -04:00
Constantin Piber
c1f2aae90d [#1739] Support sending floats (#1740)
* [#1739] Support sending floats

Required for `FloatFilter`, which needs to be float due to DB layer

* Simplify `parseValueImpl`, use correct coercion hints
2025-10-24 18:38:41 -04:00
Constantin Piber
9d09a1fe5d [#1596] Dispose KCEF on shutdown (#1738)
* [#1596] Dispose KCEF on shutdown

* Use blocking variant
2025-10-24 18:38:27 -04:00
Constantin Piber
d23d10601e Add --change-stack-guard-on-fork=disable to fix stack smashing (#1736)
* Add --change-stack-guard-on-fork=disable to fix stack smashing

See chromiumembedded/cef#3912

* Add PR comments
2025-10-24 18:38:04 -04:00
Constantin Piber
bc6e28cabe OPDS: Offer CBZ in older mimetype (#1731)
* OPDS: Offer CBZ in older mimetype

* OPDS: Include length when offering CBZ download

* Disable compression on CBZ endpoint

Zipping a zip

* CBZ download match content type of OPDS

* Move compression disable

* Introduce setting for configuring CBZ mimetype

* Document new option

[no-ci]

* Update server/src/main/kotlin/suwayomi/tachidesk/opds/impl/OpdsEntryBuilder.kt

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

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2025-10-24 18:36:59 -04:00
Constantin Piber
68492bf591 Actually set Track ID when updating track (#1726) 2025-10-20 13:56:08 -04:00
Constantin Piber
5be4d2a104 Minor bug fixes for Webview, Permission request support (#1723)
* fix: Match URLs with trailing /

* Handle permission requests and attempt to enable Widevine

* Tie CEF loglevel to server debug logs

* Lint

* Add missing file

Forgot to add in previous commits

* Provide WebResourceResponse

* Fix NullException if headers are not set

* fix: Don't allow interception for initial page load

fixes #1713

* Lint
2025-10-17 12:07:18 -04:00
Mitchell Syer
0585000cf3 Fix header/cookie based websocket auth (#1722)
* Fix header/cookie based websocket auth

* Lint
2025-10-17 12:07:02 -04:00
schroda
7b5d96189e Feature/automatic backup flags (#1702)
* Add backup flags to auto backups

* Mark ServerConfig properties as deprecated

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2025-10-14 19:40:46 -04:00
schroda
8d119fd710 Feature/cleanup backup logic (#1701)
* Extract global metadata backup logic into BackupGlobalMetaHandler

* Extract category backup logic into BackupCategoryHandler

* Extract source backup logic into BackupSourceHandler

* Extract manga backup logic into BackupMangaHandler
2025-10-14 19:37:29 -04:00
schroda
0d79ac68f8 Feature/backup import add backup flags (#1697)
* Add backup flags to backup restore

* Cleanup default backup flags handling

* Optionally exclude manga from backup
2025-10-05 18:52:45 -04:00
Constantin Piber
3ce9f72e3f Allow symlinks in static files (#1699) 2025-10-04 15:12:59 -04:00
schroda
9437e4243a Use canonical path for static files directory (#1698)
On mac the temp system folder is a symlink which jetty does not allow by default due to security reasons.
This caused the webui files to not get served on mac.
2025-10-04 15:12:52 -04:00
schroda
f4e32bac1a Clear queued state updates on immediate emission (#1685)
There was a possible race condition where immediate state updates got overwritten by previously queued ones.
For example, when the download was successful but the downloaded files are deemed invalid, a previously queued download progress state update might overwrite the emitted error state.
2025-10-03 10:38:25 -04:00
Constantin Piber
02aada7f08 [#1676] Reorder source pages (#1683)
Some sources don't properly index their pages in some situations, so
follow Mihon and reindex
2025-10-03 10:38:10 -04:00
Mitchell Syer
fb05371ac2 Add way to exclude settings from backups (#1682)
* Add way to exclude settings from backups

* Exclude flaresolverrEnabled

* Exclude usernames/passwords

* Exclude writing deprecated settings to the backup

* Exclude AuthMode
2025-10-03 10:37:50 -04:00
Mitchell Syer
2e0f72f182 Fix database connection and errors (#1681) 2025-09-29 11:24:52 -04:00
schroda
f210bbc22a Setup webUI in background (#1679)
Stops blocking javalin startup in case of internet connection issues
2025-09-29 11:24:45 -04:00
schroda
9062252939 Fix/server config duplicated types (#1672)
* Move "serverConfig" to "server-config" module

* Remove duplicated types

Unintentionally introduced with 8ef2877040
2025-09-29 11:24:26 -04:00
schroda
5c79672d84 Use graphql directive for auth handling (#1671) 2025-09-29 11:24:19 -04:00
schroda
28ab0af6d4 Fix base path injection when serving from root (#1669)
Without having a subpath defined, the base path incorrectly ended with two "/" instead of one
2025-09-25 11:56:19 -04:00
schroda
cdb98d2175 Feature/reduce logging (#1667)
* Reduce Hikari related logging

* Reduce WebView related logging
2025-09-24 18:01:23 -04:00
schroda
d95f4fe1e1 Fix/webui subpath injection (#1666)
* Cleanup subpath handling

* Move webUI serve setup logic to WebInterfaceManager

* Fix webUI subpath injection

Dynamic subpath support on the client requires using relative paths for everything.
Without a <base> tag this only works when opening the client on the root path.
Any subpath will result in a blank page because the used url to request e.g., an asset will be invalid and cause an error (type mismatch, since the index.html will be returned for any unmatch route).
2025-09-24 18:01:13 -04:00
Mitchell Syer
6e2be271c3 Minor DB Fix (#1668)
* Minor DB fix

* Lint
2025-09-24 18:01:04 -04:00
Soner Köksal
bfccbaf731 Optimize database performance with HikariCP and transaction batching (#1660)
* Optimize database performance with HikariCP and transaction batching

- Add HikariCP-7.0.2 connection pooling with Raspberry Pi optimized settings
- Consolidate database transactions in DirName, ChapterForDownload, and ChapterDownloadHelper
- Remove duplicate queries and unused methods from ChapterForDownload
- Batch database operations to reduce transaction overhead
- Add shared query functions to eliminate redundant database calls
- Configure memory settings for build optimization

Performance improvements:
- DirName functions: 99% faster (29s → 0.1s)
- ChapterDownloadHelper: 99.5% faster (54s → 0.3s)
- ChapterForDownload: 97% faster transaction operations
- Overall system: 75% faster execution time (242s → 60s)

* Fix review comments
2025-09-23 15:54:09 -04:00
Soner Köksal
c7b4f226b3 Add server-side subpath support for WebUI (#1658)
* Add server-side subpath support for WebUI

- Add webUISubpath configuration setting with regex validation
- Create temporary WebUI directory for subpath serving
- Inject subpath config into index.html for client detection
- Support all WebUI flavors (WEBUI, VUI, CUSTOM) with subpath
- Update browser opening to use subpath URLs

Related to Suwayomi/Suwayomi-WebUI#174

* Fix review points

* Fix code formatting issues

* Fix import issue
2025-09-23 15:53:53 -04:00
Mitchell Syer
808e0ecae7 Make Sure Backup Create Flags are Exposed (#1650) 2025-09-15 16:45:14 -04:00
Mitchell Syer
fafcaa222c Update Dex2Jar (#1644) 2025-09-15 09:25:20 -04:00
schroda
bbd7e30298 Fix/server startup config update failure handling (#1646)
* Catch config value migration exception

In case the value did not exist in the config a "ConfigException.Missing" exception was thrown which caused the whole migration to fail.

Fixes #1645

* Improve config migration logging

* Update user config file after config update

The user config file gets reset before the update.
This could cause the user settings to get lost on the next server start in case something went wrong during the update and the updated config never got saved to the actual file.
2025-09-14 10:32:23 -04:00
schroda
904157a91a Streamline deprecated settings config value migration logic (#1633)
* Streamline deprecated settings config value migration logic

* Add "autoDownloadAheadLimit" config migration

For consistency

* Replace "exitCode" with "shutdownApp"

* Enhance shutdown logging to include exit reason
2025-09-13 12:22:09 -04:00
renovate[bot]
89e2ba9f75 Update dependency com.pinterest.ktlint:ktlint-cli to v1.7.1 (#1520)
* Update dependency com.pinterest.ktlint:ktlint-cli to v1.7.1

* Lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2025-09-13 12:21:49 -04:00
Mitchell Syer
3f4dd2861e Fix pages after refactoring downloads (#1639) 2025-09-09 21:10:27 -04:00
schroda
7db947eba2 Restore server settings first (#1637)
The imported server settings might cause the active database to change.
In case this happens, the backup was restored into the wrong database.
2025-09-09 18:14:47 -04:00
schroda
3df0106325 Fix/logging user sensitive config data in cleartext (#1634)
* Redact username and passwords from config log

* Redact empty username and password

* Make regex Username/Password case-insensitive in config redaction
2025-09-09 18:14:21 -04:00
schroda
2b767eb488 Fix/local manga thumbnails handling (#1630)
* Skip thumbnail download for local manga sources

Local manga sources do not require downloading thumbnails as they are stored locally.

* Always update local source manga info when browsing

When making changes to an in library local source manga, a refresh from the source was required to get the latest data.
From a user perspective, this is unexpected behavior that looks like a bug.

If, for example, the thumbnail file extension got changed, the file could not be found anymore and an error was shown in the client. To fix this, a manga refresh was required.
2025-09-09 18:14:01 -04:00
Mitchell Syer
679e2c0da9 Optimize Download Queue (#1627)
* Optimize download Queue

* Lint

* Fix name of DownloadStatus file

* Re-add synchronous status fetch
2025-09-09 18:13:31 -04:00
Zeedif
275727ed90 feat(kosync): add mutations for manual progress push and pull (#1625)
Exposes the existing push and pull functionality from the KoreaderSyncService via the GraphQL API.

This change introduces two new mutations:
- `pushKoSyncProgress`: Manually sends the current chapter's reading progress to the KOReader sync server.
- `pullKoSyncProgress`: Manually fetches and applies the latest reading progress from the KOReader sync server.

These mutations enable clients and WebUIs to implement manual sync triggers, providing users with more direct control over their reading progress synchronization, similar to the functionality offered by the official KOReader plugin and other clients like Readest.
2025-09-09 18:13:05 -04:00