mirror of
https://github.com/jellyfin/jellyfin-sdk-kotlin.git
synced 2024-11-26 23:50:32 +00:00
Fix all linter issues from 1.0.z release (#290)
This commit is contained in:
parent
1a35394f62
commit
4668b3d6ce
@ -23,7 +23,10 @@ public class KtorClientTests {
|
||||
"c" to "2"
|
||||
)
|
||||
|
||||
assertEquals(instance.baseUrl + "test?a=b&c=2", instance.createUrl("test", queryParameters = parameters))
|
||||
assertEquals(
|
||||
instance.baseUrl + "test?a=b&c=2",
|
||||
instance.createUrl("test", queryParameters = parameters)
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -35,7 +38,10 @@ public class KtorClientTests {
|
||||
"d" to "2"
|
||||
)
|
||||
|
||||
assertEquals(instance.baseUrl + "test?a=b&d=2", instance.createUrl("test", queryParameters = parameters))
|
||||
assertEquals(
|
||||
instance.baseUrl + "test?a=b&d=2",
|
||||
instance.createUrl("test", queryParameters = parameters)
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -47,7 +53,10 @@ public class KtorClientTests {
|
||||
"str" to "str"
|
||||
)
|
||||
|
||||
assertEquals(instance.baseUrl + "test?one=1&bool=true&str=str", instance.createUrl("test", queryParameters = parameters))
|
||||
assertEquals(
|
||||
instance.baseUrl + "test?one=1&bool=true&str=str",
|
||||
instance.createUrl("test", queryParameters = parameters)
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -58,6 +67,9 @@ public class KtorClientTests {
|
||||
"field2" to ItemFields.DATE_CREATED,
|
||||
)
|
||||
|
||||
assertEquals(instance.baseUrl + "test?field1=Chapters&field2=DateCreated", instance.createUrl("test", queryParameters = parameters))
|
||||
assertEquals(
|
||||
instance.baseUrl + "test?field1=Chapters&field2=DateCreated",
|
||||
instance.createUrl("test", queryParameters = parameters)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,10 @@ import org.jellyfin.sdk.api.operations.MediaInfoApi
|
||||
class Bitrate(
|
||||
private val jellyfin: Jellyfin,
|
||||
) : CliktCommand("Detect or measure bitrate") {
|
||||
private companion object {
|
||||
private const val MEGABIT = 1000000
|
||||
}
|
||||
|
||||
private val server by serverOption()
|
||||
private val token by tokenOption()
|
||||
private val bytes by option(
|
||||
@ -33,7 +37,7 @@ class Bitrate(
|
||||
echo(buildString {
|
||||
appendLine("Requested ${measurement.bytes} bytes from the server.")
|
||||
appendLine("Reply took ${measurement.duration}ms.")
|
||||
appendLine("Measured bitrate is ${measurement.bitrate} (${measurement.bitrate / 1000000} megabit).")
|
||||
appendLine("Measured bitrate is ${measurement.bitrate} (${measurement.bitrate / MEGABIT} megabit).")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user