mirror of
https://github.com/dirtydishes/dreamio.git
synced 2026-06-06 13:37:24 +00:00
preserve subtitle language labels
This commit is contained in:
parent
0e751e4486
commit
1b3a2529a7
6 changed files with 328 additions and 1 deletions
|
|
@ -48,13 +48,48 @@ enum SubtitleDisplayName {
|
|||
]
|
||||
|
||||
private static let languageCodeAliases = [
|
||||
"ara": "ar",
|
||||
"ar": "ar",
|
||||
"cze": "cs",
|
||||
"ces": "cs",
|
||||
"cs": "cs",
|
||||
"dan": "da",
|
||||
"da": "da",
|
||||
"de": "de",
|
||||
"deu": "de",
|
||||
"ell": "el",
|
||||
"el": "el",
|
||||
"eng": "en",
|
||||
"en": "en",
|
||||
"fin": "fi",
|
||||
"fi": "fi",
|
||||
"spa": "es",
|
||||
"es": "es",
|
||||
"ger": "de",
|
||||
"gre": "el",
|
||||
"heb": "he",
|
||||
"he": "he",
|
||||
"hun": "hu",
|
||||
"hu": "hu",
|
||||
"fre": "fr",
|
||||
"fra": "fr",
|
||||
"fr": "fr"
|
||||
"fr": "fr",
|
||||
"dut": "nl",
|
||||
"nld": "nl",
|
||||
"nl": "nl",
|
||||
"per": "fa",
|
||||
"fas": "fa",
|
||||
"fa": "fa",
|
||||
"pob": "pt",
|
||||
"por": "pt",
|
||||
"pt": "pt",
|
||||
"ron": "ro",
|
||||
"rum": "ro",
|
||||
"ro": "ro",
|
||||
"srp": "sr",
|
||||
"sr": "sr",
|
||||
"tur": "tr",
|
||||
"tr": "tr"
|
||||
]
|
||||
|
||||
static func displayName(for candidate: SubtitleCandidate) -> String {
|
||||
|
|
|
|||
|
|
@ -329,6 +329,7 @@ final class VLCNativePlaybackBackend: NSObject, NativePlaybackBackend {
|
|||
.filter { $0.id >= 0 }
|
||||
.filter { !externalSubtitleBaselineTrackIDs.contains($0.id) }
|
||||
.filter { externalSubtitleDisplayNamesByTrackID[$0.id] == nil }
|
||||
.filter { SubtitleDisplayName.isGenericLabel($0.name) }
|
||||
.sorted { $0.id < $1.id }
|
||||
.forEach { track in
|
||||
guard !pendingExternalSubtitleDisplayNames.isEmpty else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue