Update style for ktlint 1.8 (#390)

Updated `ktlint`, so lots of code style changes, no user facing changes
This commit is contained in:
damontecres 2025-12-06 18:11:07 -05:00 committed by GitHub
parent e9c54adaba
commit 9e7742034a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
54 changed files with 577 additions and 196 deletions

View file

@ -76,13 +76,14 @@ class ImageUrlService
}
}
else ->
else -> {
getItemImageUrl(
itemId = itemId,
imageType = imageType,
fillWidth = fillWidth,
fillHeight = fillHeight,
)
}
}
fun getItemImageUrl(

View file

@ -138,7 +138,7 @@ class PlaylistCreator
BaseItemKind.BOX_SET,
BaseItemKind.COLLECTION_FOLDER,
BaseItemKind.USER_VIEW,
->
-> {
PlaylistCreationResult.Success(
createFromCollection(
item = item,
@ -152,6 +152,7 @@ class PlaylistCreator
filter = filter,
),
)
}
BaseItemKind.EPISODE -> {
val seriesId = item.seriesId
@ -185,7 +186,7 @@ class PlaylistCreator
}
}
BaseItemKind.SERIES ->
BaseItemKind.SERIES -> {
PlaylistCreationResult.Success(
createFromEpisode(
seriesId = item.id,
@ -194,8 +195,9 @@ class PlaylistCreator
shuffled = shuffled,
),
)
}
BaseItemKind.PLAYLIST ->
BaseItemKind.PLAYLIST -> {
PlaylistCreationResult.Success(
createFromPlaylistId(
item.id,
@ -203,6 +205,7 @@ class PlaylistCreator
shuffled,
),
)
}
// Not support yet
// BaseItemKind.AGGREGATE_FOLDER -> TODO()
@ -212,7 +215,9 @@ class PlaylistCreator
// BaseItemKind.MUSIC_ALBUM -> TODO()
// BaseItemKind.MUSIC_ARTIST -> TODO()
else -> PlaylistCreationResult.Error(null, "Unsupported type: ${item.type}")
else -> {
PlaylistCreationResult.Error(null, "Unsupported type: ${item.type}")
}
}
suspend fun getServerPlaylists(

View file

@ -85,9 +85,13 @@ class ThemeSongPlayer
-> return
ThemeSongVolume.LOWEST -> .05f
ThemeSongVolume.LOW -> .1f
ThemeSongVolume.MEDIUM -> .25f
ThemeSongVolume.HIGH -> .5f
ThemeSongVolume.HIGHEST -> 75f
}
player.apply {

View file

@ -62,7 +62,7 @@ class TrailerService
navigateTo: (Destination) -> Unit,
) {
when (trailer) {
is LocalTrailer ->
is LocalTrailer -> {
navigateTo.invoke(
Destination.Playback(
itemId = trailer.baseItem.id,
@ -70,6 +70,7 @@ class TrailerService
positionMs = 0L,
),
)
}
is RemoteTrailer -> {
val intent = Intent(Intent.ACTION_VIEW, trailer.url.toUri())

View file

@ -299,14 +299,16 @@ class UpdateChecker
fun hasPermissions(): Boolean =
Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q ||
ContextCompat.checkSelfPermission(
context,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
) == PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(
context,
Manifest.permission.READ_EXTERNAL_STORAGE,
) == PackageManager.PERMISSION_GRANTED
(
ContextCompat.checkSelfPermission(
context,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
) == PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(
context,
Manifest.permission.READ_EXTERNAL_STORAGE,
) == PackageManager.PERMISSION_GRANTED
)
/**
* Delete previously downloaded APKs