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

@ -30,15 +30,42 @@ data class TrackSupport(
} else {
val type =
when (codecs) {
MimeTypes.TEXT_VTT -> "vtt"
MimeTypes.APPLICATION_VOBSUB -> "vobsub"
MimeTypes.APPLICATION_SUBRIP -> "srt"
MimeTypes.TEXT_SSA -> "ssa"
MimeTypes.APPLICATION_PGS -> "pgs"
MimeTypes.APPLICATION_DVBSUBS -> "dvd"
MimeTypes.APPLICATION_TTML -> "ttml"
MimeTypes.TEXT_UNKNOWN -> "unknown"
null -> "unknown"
MimeTypes.TEXT_VTT -> {
"vtt"
}
MimeTypes.APPLICATION_VOBSUB -> {
"vobsub"
}
MimeTypes.APPLICATION_SUBRIP -> {
"srt"
}
MimeTypes.TEXT_SSA -> {
"ssa"
}
MimeTypes.APPLICATION_PGS -> {
"pgs"
}
MimeTypes.APPLICATION_DVBSUBS -> {
"dvd"
}
MimeTypes.APPLICATION_TTML -> {
"ttml"
}
MimeTypes.TEXT_UNKNOWN -> {
"unknown"
}
null -> {
"unknown"
}
else -> {
val split = codecs.split("/")
if (split.size > 1) split[1] else codecs

View file

@ -70,13 +70,19 @@ fun createDeviceProfile(
) = buildDeviceProfile {
val allowedAudioCodecs =
when {
downMixAudio -> downmixSupportedAudioCodecs
!isAC3Enabled ->
downMixAudio -> {
downmixSupportedAudioCodecs
}
!isAC3Enabled -> {
supportedAudioCodecs
.filterNot { it == Codec.Audio.EAC3 || it == Codec.Audio.AC3 }
.toTypedArray()
}
else -> supportedAudioCodecs
else -> {
supportedAudioCodecs
}
}
val supportsHevc = mediaTest.supportsHevc()
@ -193,8 +199,11 @@ fun createDeviceProfile(
conditions {
when {
!supportsAVC -> ProfileConditionValue.VIDEO_PROFILE equals "none"
else ->
!supportsAVC -> {
ProfileConditionValue.VIDEO_PROFILE equals "none"
}
else -> {
ProfileConditionValue.VIDEO_PROFILE inCollection
listOfNotNull(
"high",
@ -203,6 +212,7 @@ fun createDeviceProfile(
"constrained baseline",
if (supportsAVCHigh10) "main 10" else null,
)
}
}
}
}
@ -276,13 +286,17 @@ fun createDeviceProfile(
conditions {
when {
!supportsHevc -> ProfileConditionValue.VIDEO_PROFILE equals "none"
else ->
!supportsHevc -> {
ProfileConditionValue.VIDEO_PROFILE equals "none"
}
else -> {
ProfileConditionValue.VIDEO_PROFILE inCollection
listOfNotNull(
"main",
if (supportsHevcMain10) "main 10" else null,
)
}
}
}
}