All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.qbittorrent.models.QBittorrentPrefsSerializerMapping.kt Maven / Gradle / Ivy

The newest version!
package qbittorrent.models

import kotlin.Boolean
import kotlin.Float
import kotlin.Int
import kotlin.PublishedApi
import kotlin.String
import kotlin.reflect.KProperty1
import kotlinx.serialization.KSerializer
import kotlinx.serialization.serializer
import qbittorrent.models.preferences.ProxyType
import qbittorrent.models.serialization.BittorrentProtocolSerializer
import qbittorrent.models.serialization.DyndnsServiceSerializer
import qbittorrent.models.serialization.MaxRatioActionSerializer
import qbittorrent.models.serialization.NewLineListSerializer
import qbittorrent.models.serialization.ScanDirSerializer
import qbittorrent.models.serialization.SchedulerDaysSerializer
import qbittorrent.models.serialization.SemiColonListSerializer
import qbittorrent.models.serialization.TorrentEncryptionSerializer
import qbittorrent.models.serialization.UploadChokingAlgorithmSerializer
import qbittorrent.models.serialization.UploadSlotsBehaviorSerializer
import qbittorrent.models.serialization.UtpTcpMixedModeSerializer

@PublishedApi
internal fun KProperty1.getSerializer(): KSerializer<*> = when (name) {
  "locale" -> serializer()
  "createSubfolderEnabled" -> serializer()
  "startPausedEnabled" -> serializer()
  "autoDeleteMode" -> serializer()
  "preallocateAll" -> serializer()
  "incompleteFilesExt" -> serializer()
  "autoTmmEnabled" -> serializer()
  "torrentChangedTmmEnabled" -> serializer()
  "savePathChangedTmmEnabled" -> serializer()
  "categoryChangedTmmEnabled" -> serializer()
  "savePath" -> serializer()
  "tempPathEnabled" -> serializer()
  "tempPath" -> serializer()
  "scanDirs" -> ScanDirSerializer
  "exportDir" -> serializer()
  "exportDirFinished" -> serializer()
  "mailNotificationEnabled" -> serializer()
  "mailNotificationSender" -> serializer()
  "mailNotificationEmail" -> serializer()
  "mailNotificationSmtp" -> serializer()
  "mailNotificationSslEnabled" -> serializer()
  "mailNotificationAuthEnabled" -> serializer()
  "mailNotificationUsername" -> serializer()
  "mailNotificationPassword" -> serializer()
  "autorunEnabled" -> serializer()
  "autorunProgram" -> serializer()
  "queueingEnabled" -> serializer()
  "maxActiveDownloads" -> serializer()
  "maxActiveTorrents" -> serializer()
  "maxActiveUploads" -> serializer()
  "dontCountSlowTorrents" -> serializer()
  "slowTorrentDlRateThreshold" -> serializer()
  "slowTorrentUlRateThreshold" -> serializer()
  "slowTorrentInactiveTimer" -> serializer()
  "maxRatioEnabled" -> serializer()
  "maxRatio" -> serializer()
  "maxRatioAction" -> MaxRatioActionSerializer
  "listenPort" -> serializer()
  "upnp" -> serializer()
  "randomPort" -> serializer()
  "dlLimit" -> serializer()
  "upLimit" -> serializer()
  "maxConnections" -> serializer()
  "maxConnectionsPerTorrent" -> serializer()
  "maxUploads" -> serializer()
  "maxUploadsPerTorrent" -> serializer()
  "stopTrackerTimeout" -> serializer()
  "enablePieceExtentAffinity" -> serializer()
  "bittorrentProtocol" -> BittorrentProtocolSerializer
  "limitUtpRate" -> serializer()
  "limitTcpOverhead" -> serializer()
  "limitLanPeers" -> serializer()
  "altDlLimit" -> serializer()
  "altUpLimit" -> serializer()
  "schedulerEnabled" -> serializer()
  "scheduleFromHour" -> serializer()
  "scheduleFromMin" -> serializer()
  "scheduleToHour" -> serializer()
  "scheduleToMin" -> serializer()
  "schedulerDays" -> SchedulerDaysSerializer
  "dht" -> serializer()
  "pex" -> serializer()
  "lsd" -> serializer()
  "encryption" -> TorrentEncryptionSerializer
  "anonymousMode" -> serializer()
  "proxyType" -> serializer()
  "proxyIp" -> serializer()
  "proxyPort" -> serializer()
  "proxyPeerConnections" -> serializer()
  "proxyAuthEnabled" -> serializer()
  "proxyUsername" -> serializer()
  "proxyPassword" -> serializer()
  "proxyTorrentsOnly" -> serializer()
  "ipFilterEnabled" -> serializer()
  "ipFilterPath" -> serializer()
  "ipFilterTrackers" -> serializer()
  "webUiDomainList" -> SemiColonListSerializer
  "webUiAddress" -> serializer()
  "webUiPort" -> serializer()
  "webUiUpnp" -> serializer()
  "webUiUsername" -> serializer()
  "webUiPassword" -> serializer()
  "webUiCsrfProtectionEnabled" -> serializer()
  "webUiClickjackingProtectionEnabled" -> serializer()
  "webUiSecureCookieEnabled" -> serializer()
  "webUiMaxAuthFailCount" -> serializer()
  "webUiBanDuration" -> serializer()
  "webUiSessionTimeout" -> serializer()
  "webUiHostHeaderValidationEnabled" -> serializer()
  "bypassLocalAuth" -> serializer()
  "bypassAuthSubnetWhitelistEnabled" -> serializer()
  "bypassAuthSubnetWhitelist" -> NewLineListSerializer
  "alternativeWebUiEnabled" -> serializer()
  "alternativeWebUiPath" -> serializer()
  "useHttps" -> serializer()
  "webUiHttpsKeyPath" -> serializer()
  "webUiHttpsCertPath" -> serializer()
  "dyndnsEnabled" -> serializer()
  "dyndnsService" -> DyndnsServiceSerializer
  "dyndnsUsername" -> serializer()
  "dyndnsPassword" -> serializer()
  "dyndnsDomain" -> serializer()
  "rssRefreshInterval" -> serializer()
  "rssMaxArticlesPerFeed" -> serializer()
  "rssProcessingEnabled" -> serializer()
  "rssAutoDownloadingEnabled" -> serializer()
  "rssDownloadRepackProperEpisodes" -> serializer()
  "rssSmartEpisodeFilters" -> serializer()
  "addTrackersEnabled" -> serializer()
  "addTrackers" -> NewLineListSerializer
  "webUiUseCustomHttpHeadersEnabled" -> serializer()
  "webUiCustomHttpHeaders" -> NewLineListSerializer
  "maxSeedingTimeEnabled" -> serializer()
  "maxSeedingTime" -> serializer()
  "announceIp" -> serializer()
  "announceToAllTiers" -> serializer()
  "announceToAllTrackers" -> serializer()
  "asyncIoThreads" -> serializer()
  "bannedIps" -> NewLineListSerializer
  "checkingMemoryUse" -> serializer()
  "currentInterfaceAddress" -> serializer()
  "currentNetworkInterface" -> serializer()
  "diskCache" -> serializer()
  "diskCacheTtl" -> serializer()
  "embeddedTrackerPort" -> serializer()
  "enableCoalesceReadWrite" -> serializer()
  "enableEmbeddedTracker" -> serializer()
  "enableMultiConnectionsFromSameIp" -> serializer()
  "enableOsCache" -> serializer()
  "enableUploadSuggestions" -> serializer()
  "filePoolSize" -> serializer()
  "outgoingPortsMax" -> serializer()
  "outgoingPortsMin" -> serializer()
  "recheckCompletedTorrents" -> serializer()
  "resolvePeerCountries" -> serializer()
  "saveResumeDataInterval" -> serializer()
  "sendBufferLowWatermark" -> serializer()
  "sendBufferWatermark" -> serializer()
  "sendBufferWatermarkFactor" -> serializer()
  "socketBacklogSize" -> serializer()
  "uploadChokingAlgorithm" -> UploadChokingAlgorithmSerializer
  "uploadSlotsBehavior" -> UploadSlotsBehaviorSerializer
  "upnpLeaseDuration" -> serializer()
  "utpTcpMixedMode" -> UtpTcpMixedModeSerializer
  else -> error("no serializer found for property")
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy