mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Update style for ktlint 1.8 (#390)
Updated `ktlint`, so lots of code style changes, no user facing changes
This commit is contained in:
parent
e9c54adaba
commit
9e7742034a
54 changed files with 577 additions and 196 deletions
|
|
@ -76,13 +76,14 @@ class ImageUrlService
|
|||
}
|
||||
}
|
||||
|
||||
else ->
|
||||
else -> {
|
||||
getItemImageUrl(
|
||||
itemId = itemId,
|
||||
imageType = imageType,
|
||||
fillWidth = fillWidth,
|
||||
fillHeight = fillHeight,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun getItemImageUrl(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -85,9 +85,13 @@ class ThemeSongPlayer
|
|||
-> return
|
||||
|
||||
ThemeSongVolume.LOWEST -> .05f
|
||||
|
||||
ThemeSongVolume.LOW -> .1f
|
||||
|
||||
ThemeSongVolume.MEDIUM -> .25f
|
||||
|
||||
ThemeSongVolume.HIGH -> .5f
|
||||
|
||||
ThemeSongVolume.HIGHEST -> 75f
|
||||
}
|
||||
player.apply {
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue