mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Change "download conversion compression level" type to Double (#1535)
https://opensource.expediagroup.com/graphql-kotlin/docs/schema-generator/writing-schemas/scalars/#primitive-types
This commit is contained in:
@@ -117,13 +117,13 @@ interface Settings : Node {
|
|||||||
interface SettingsDownloadConversion {
|
interface SettingsDownloadConversion {
|
||||||
val mimeType: String
|
val mimeType: String
|
||||||
val target: String
|
val target: String
|
||||||
val compressionLevel: Float?
|
val compressionLevel: Double?
|
||||||
}
|
}
|
||||||
|
|
||||||
class SettingsDownloadConversionType(
|
class SettingsDownloadConversionType(
|
||||||
override val mimeType: String,
|
override val mimeType: String,
|
||||||
override val target: String,
|
override val target: String,
|
||||||
override val compressionLevel: Float?,
|
override val compressionLevel: Double?,
|
||||||
) : SettingsDownloadConversion
|
) : SettingsDownloadConversion
|
||||||
|
|
||||||
data class PartialSettingsType(
|
data class PartialSettingsType(
|
||||||
|
|||||||
@@ -89,6 +89,6 @@ data class BackupServerSettings(
|
|||||||
class BackupSettingsDownloadConversionType(
|
class BackupSettingsDownloadConversionType(
|
||||||
@ProtoNumber(1) override val mimeType: String,
|
@ProtoNumber(1) override val mimeType: String,
|
||||||
@ProtoNumber(2) override val target: String,
|
@ProtoNumber(2) override val target: String,
|
||||||
@ProtoNumber(3) override val compressionLevel: Float?,
|
@ProtoNumber(3) override val compressionLevel: Double?,
|
||||||
) : SettingsDownloadConversion
|
) : SettingsDownloadConversion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ abstract class ChaptersFilesProvider<Type : FileType>(
|
|||||||
val writerParams = writer.defaultWriteParam
|
val writerParams = writer.defaultWriteParam
|
||||||
targetConversion.compressionLevel?.let {
|
targetConversion.compressionLevel?.let {
|
||||||
writerParams.compressionMode = ImageWriteParam.MODE_EXPLICIT
|
writerParams.compressionMode = ImageWriteParam.MODE_EXPLICIT
|
||||||
writerParams.compressionQuality = it
|
writerParams.compressionQuality = it.toFloat()
|
||||||
}
|
}
|
||||||
val success =
|
val success =
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class ServerConfig(
|
|||||||
|
|
||||||
data class DownloadConversion(
|
data class DownloadConversion(
|
||||||
val target: String,
|
val target: String,
|
||||||
val compressionLevel: Float? = null,
|
val compressionLevel: Double? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
// extensions
|
// extensions
|
||||||
|
|||||||
Reference in New Issue
Block a user