ServerVersion

@Serializable
data class ServerVersion(val major: Int, val minor: Int, val patch: Int, val build: Int? = null) : Comparable<ServerVersion>

Model to help with Jellyfin server versions. Use fromString to parse strings. The format is similar to SemVer.

Constructors

Link copied to clipboard
constructor(major: Int, minor: Int, patch: Int, build: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val build: Int?
Link copied to clipboard
val major: Int
Link copied to clipboard
val minor: Int
Link copied to clipboard
val patch: Int

Functions

Link copied to clipboard
open operator override fun compareTo(other: ServerVersion): Int
Link copied to clipboard
open override fun toString(): String

Convert version to string. Format is "major.minor.patch.build". build is omitted if null. patch is omitted if major is 12 or higher, patch is 0 and build is null. Sample output:

fun toString(parts: Int = 2): String

Convert version to string. Format is "major.minor.patch.build". The amount of parts returned is determined by parts and should be between 1 and 4 (inclusive). Defaults to 2 parts. Sample output: