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
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue