mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 19:34:35 -05:00
Compare commits
7 Commits
e93efa9627
...
16a14e6ac2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16a14e6ac2 | ||
|
|
a2f29ec9dc | ||
|
|
82df985201 | ||
|
|
740db4f1ab | ||
|
|
c4711dec00 | ||
|
|
75d8d172aa | ||
|
|
81fb8c395d |
4
.github/workflows/build_pull_request.yml
vendored
4
.github/workflows/build_pull_request.yml
vendored
@@ -67,7 +67,7 @@ jobs:
|
|||||||
export LD_PRELOAD="$(pwd)/scripts/resources/catch_abort.so"
|
export LD_PRELOAD="$(pwd)/scripts/resources/catch_abort.so"
|
||||||
JAR=$(ls ./server/build/*.jar| head -1)
|
JAR=$(ls ./server/build/*.jar| head -1)
|
||||||
set +e
|
set +e
|
||||||
timeout 30s java -DcrashOnFailedMigration=true \
|
timeout 30s java \
|
||||||
-Dsuwayomi.tachidesk.config.server.systemTrayEnabled=false \
|
-Dsuwayomi.tachidesk.config.server.systemTrayEnabled=false \
|
||||||
-Dsuwayomi.tachidesk.config.server.initialOpenInBrowserEnabled=false \
|
-Dsuwayomi.tachidesk.config.server.initialOpenInBrowserEnabled=false \
|
||||||
-Dsuwayomi.tachidesk.config.server.databaseType=POSTGRESQL \
|
-Dsuwayomi.tachidesk.config.server.databaseType=POSTGRESQL \
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
exit "$ecode"
|
exit "$ecode"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
timeout 30s java -DcrashOnFailedMigration=true \
|
timeout 30s java \
|
||||||
-Dsuwayomi.tachidesk.config.server.systemTrayEnabled=false \
|
-Dsuwayomi.tachidesk.config.server.systemTrayEnabled=false \
|
||||||
-Dsuwayomi.tachidesk.config.server.initialOpenInBrowserEnabled=false \
|
-Dsuwayomi.tachidesk.config.server.initialOpenInBrowserEnabled=false \
|
||||||
-jar "$JAR"
|
-jar "$JAR"
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- (Database/H2) Use the latest H2 database engine
|
- (Database/H2) Use the latest H2 database engine
|
||||||
|
- (Startup) Crash on startup if an unrecoverable error happens
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- (CloudFlareInterceptor) Don't send the `cf_clearance` cookie back to Flaresolverr
|
- (CloudFlareInterceptor) Don't send the `cf_clearance` cookie back to Flaresolverr
|
||||||
- (WebUI) Handle serving non-default webui with "bundled"
|
- (WebUI) Handle serving non-default webui with "bundled"
|
||||||
- (WebUI) Wait until WebUI is ready to open in browser
|
- (WebUI) Wait until WebUI is ready to open in browser
|
||||||
- (Downloads) Truncate filenames by byte length to prevent "File name too long" IO errors
|
- (Downloads) Truncate filenames by byte length to prevent "File name too long" IO errors
|
||||||
|
- (Extension) Do not indicate an update is available when the extension is not installed
|
||||||
|
|
||||||
## [v2.2.2100] + [WebUI: v20260508.01] - 2026-05-08
|
## [v2.2.2100] + [WebUI: v20260508.01] - 2026-05-08
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ coroutines = "1.11.0"
|
|||||||
serialization = "1.11.0"
|
serialization = "1.11.0"
|
||||||
jvmTarget = "21"
|
jvmTarget = "21"
|
||||||
okhttp = "5.3.2" # Major version is locked by Tachiyomi extensions
|
okhttp = "5.3.2" # Major version is locked by Tachiyomi extensions
|
||||||
javalin = "7.2.0"
|
javalin = "7.2.2"
|
||||||
jte = "3.2.4"
|
jte = "3.2.4"
|
||||||
jackson = "3.1.3" # jackson version locked by javalin, ref: `io.javalin.core.util.OptionalDependency`
|
jackson = "3.1.3" # jackson version locked by javalin, ref: `io.javalin.core.util.OptionalDependency`
|
||||||
exposed = "1.2.0"
|
exposed = "1.2.0"
|
||||||
@@ -37,7 +37,7 @@ serialization-xml-core = { module = "io.github.pdvrieze.xmlutil:core", version.r
|
|||||||
serialization-xml = { module = "io.github.pdvrieze.xmlutil:serialization-jvm", version.ref = "xmlserialization" }
|
serialization-xml = { module = "io.github.pdvrieze.xmlutil:serialization-jvm", version.ref = "xmlserialization" }
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
slf4japi = "org.slf4j:slf4j-api:2.0.17"
|
slf4japi = "org.slf4j:slf4j-api:2.0.18"
|
||||||
logback = "ch.qos.logback:logback-classic:1.5.32"
|
logback = "ch.qos.logback:logback-classic:1.5.32"
|
||||||
kotlinlogging = "io.github.oshai:kotlin-logging-jvm:8.0.02"
|
kotlinlogging = "io.github.oshai:kotlin-logging-jvm:8.0.02"
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ appdirs = "ca.gosyer:kotlin-multiplatform-appdirs:2.0.0"
|
|||||||
cache4k = "io.github.reactivecircus.cache4k:cache4k:0.14.0"
|
cache4k = "io.github.reactivecircus.cache4k:cache4k:0.14.0"
|
||||||
zip4j = "net.lingala.zip4j:zip4j:2.11.6"
|
zip4j = "net.lingala.zip4j:zip4j:2.11.6"
|
||||||
commonscompress = "org.apache.commons:commons-compress:1.28.0"
|
commonscompress = "org.apache.commons:commons-compress:1.28.0"
|
||||||
junrar = "com.github.junrar:junrar:7.5.10"
|
junrar = "com.github.junrar:junrar:7.6.0"
|
||||||
|
|
||||||
# AES/CBC/PKCS7Padding Cypher provider
|
# AES/CBC/PKCS7Padding Cypher provider
|
||||||
bouncycastle = "org.bouncycastle:bcprov-jdk18on:1.84"
|
bouncycastle = "org.bouncycastle:bcprov-jdk18on:1.84"
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
retries=0
|
retries=0
|
||||||
retryBackOffMs=500
|
retryBackOffMs=500
|
||||||
|
|||||||
@@ -358,6 +358,7 @@ object Extension {
|
|||||||
} else {
|
} else {
|
||||||
ExtensionTable.update({ ExtensionTable.pkgName eq pkgName }) {
|
ExtensionTable.update({ ExtensionTable.pkgName eq pkgName }) {
|
||||||
it[isInstalled] = false
|
it[isInstalled] = false
|
||||||
|
it[hasUpdate] = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import android.content.Context
|
|||||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||||
import suwayomi.tachidesk.manga.impl.update.IUpdater
|
import suwayomi.tachidesk.manga.impl.update.IUpdater
|
||||||
import suwayomi.tachidesk.server.database.H2Migration
|
import suwayomi.tachidesk.server.database.H2Migration
|
||||||
|
import suwayomi.tachidesk.server.util.ExitCode
|
||||||
|
import suwayomi.tachidesk.server.util.shutdownApp
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -99,31 +101,35 @@ private val MIGRATIONS =
|
|||||||
|
|
||||||
fun runMigrations(applicationDirs: ApplicationDirs) {
|
fun runMigrations(applicationDirs: ApplicationDirs) {
|
||||||
val logger = KotlinLogging.logger("Migration")
|
val logger = KotlinLogging.logger("Migration")
|
||||||
|
try {
|
||||||
|
val migrationPreferences =
|
||||||
|
Injekt
|
||||||
|
.get<Application>()
|
||||||
|
.getSharedPreferences(
|
||||||
|
"migrations",
|
||||||
|
Context.MODE_PRIVATE,
|
||||||
|
)
|
||||||
|
val version = migrationPreferences.getInt("version", 0)
|
||||||
|
|
||||||
val migrationPreferences =
|
logger.info { "Running migrations, previous version $version, target version ${MIGRATIONS.size}" }
|
||||||
Injekt
|
|
||||||
.get<Application>()
|
|
||||||
.getSharedPreferences(
|
|
||||||
"migrations",
|
|
||||||
Context.MODE_PRIVATE,
|
|
||||||
)
|
|
||||||
val version = migrationPreferences.getInt("version", 0)
|
|
||||||
|
|
||||||
logger.info { "Running migrations, previous version $version, target version ${MIGRATIONS.size}" }
|
MIGRATIONS.forEachIndexed { index, (migrationName, migrationFunction) ->
|
||||||
|
val migrationVersion = index + 1
|
||||||
|
|
||||||
MIGRATIONS.forEachIndexed { index, (migrationName, migrationFunction) ->
|
val isMigrationRequired = version < migrationVersion
|
||||||
val migrationVersion = index + 1
|
if (!isMigrationRequired) {
|
||||||
|
logger.info { "Skipping migration version $migrationVersion: $migrationName" }
|
||||||
|
return@forEachIndexed
|
||||||
|
}
|
||||||
|
|
||||||
val isMigrationRequired = version < migrationVersion
|
logger.info { "Running migration version $migrationVersion: $migrationName" }
|
||||||
if (!isMigrationRequired) {
|
|
||||||
logger.info { "Skipping migration version $migrationVersion: $migrationName" }
|
migrationFunction(applicationDirs)
|
||||||
return@forEachIndexed
|
|
||||||
|
migrationPreferences.edit().putInt("version", migrationVersion).apply()
|
||||||
}
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
logger.info { "Running migration version $migrationVersion: $migrationName" }
|
logger.error(e) { "Failed to run migrations" }
|
||||||
|
shutdownApp(ExitCode.MigrationsRunFailure)
|
||||||
migrationFunction(applicationDirs)
|
|
||||||
|
|
||||||
migrationPreferences.edit().putInt("version", migrationVersion).apply()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ fun applicationSetup() {
|
|||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logger.error(e) { "Exception while creating initial server.conf" }
|
logger.error(e) { "Exception while creating initial server.conf" }
|
||||||
|
shutdownApp(ExitCode.SetupConfFileFailed)
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy local source icon
|
// copy local source icon
|
||||||
@@ -378,6 +379,7 @@ fun applicationSetup() {
|
|||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logger.error(e) { "Exception while copying Local source's icon" }
|
logger.error(e) { "Exception while copying Local source's icon" }
|
||||||
|
shutdownApp(ExitCode.LocalSourceIconCopyFailure)
|
||||||
}
|
}
|
||||||
|
|
||||||
// fixes #119 , ref:
|
// fixes #119 , ref:
|
||||||
@@ -395,7 +397,12 @@ fun applicationSetup() {
|
|||||||
|
|
||||||
databaseUp()
|
databaseUp()
|
||||||
|
|
||||||
LocalSource.register()
|
try {
|
||||||
|
LocalSource.register()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
logger.error(e) { "Failed to setup LocalSource" }
|
||||||
|
shutdownApp(ExitCode.LocalSourceSetupFailure)
|
||||||
|
}
|
||||||
|
|
||||||
serverConfig.subscribeTo(
|
serverConfig.subscribeTo(
|
||||||
combine<Any, DatabaseSettings>(
|
combine<Any, DatabaseSettings>(
|
||||||
@@ -525,7 +532,7 @@ fun applicationSetup() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
download { github() }
|
download { github { release("jbr-release-21.0.10b1163.108") } }
|
||||||
settings {
|
settings {
|
||||||
windowlessRenderingEnabled = true
|
windowlessRenderingEnabled = true
|
||||||
cachePath = (Path(applicationDirs.dataRoot) / "cache/kcef").toString()
|
cachePath = (Path(applicationDirs.dataRoot) / "cache/kcef").toString()
|
||||||
|
|||||||
@@ -185,8 +185,6 @@ fun databaseUp() {
|
|||||||
runMigrations(migrations)
|
runMigrations(migrations)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logger.error(e) { "Error up-to-database migration" }
|
logger.error(e) { "Error up-to-database migration" }
|
||||||
if (System.getProperty("crashOnFailedMigration").toBoolean()) {
|
shutdownApp(ExitCode.DbMigrationFailure)
|
||||||
shutdownApp(ExitCode.DbMigrationFailure)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ enum class ExitCode(
|
|||||||
WebUISetupFailure(3),
|
WebUISetupFailure(3),
|
||||||
ConfigMigrationMisconfiguredFailure(4),
|
ConfigMigrationMisconfiguredFailure(4),
|
||||||
DbMigrationFailure(5),
|
DbMigrationFailure(5),
|
||||||
|
SetupConfFileFailed(6),
|
||||||
|
LocalSourceIconCopyFailure(7),
|
||||||
|
LocalSourceSetupFailure(8),
|
||||||
|
MigrationsRunFailure(9),
|
||||||
}
|
}
|
||||||
|
|
||||||
fun shutdownApp(exitCode: ExitCode) {
|
fun shutdownApp(exitCode: ExitCode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user