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:
schroda
2025-07-20 23:00:00 +02:00
committed by GitHub
parent 5057a57f7f
commit 192136e66c
4 changed files with 5 additions and 5 deletions

View File

@@ -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(

View File

@@ -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
} }

View File

@@ -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 {

View File

@@ -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