Fix all linter issues from 1.0.z release (#290)

This commit is contained in:
Niels van Velzen 2021-07-08 23:03:14 +02:00 committed by GitHub
parent 1a35394f62
commit 4668b3d6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 5 deletions

View File

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

View File

@ -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).")
})
}
}