Fix finding hearing impaired flag changes

This commit is contained in:
RatzzFatzz
2025-12-17 13:32:23 +01:00
parent 957295127a
commit 76d25fca1b
5 changed files with 12 additions and 6 deletions

View File

@@ -248,7 +248,7 @@ class AttributeChangeProcessorTest {
Set.of("SDH"),
Map.ofEntries(on(withName(SUB_GER, "SDH")))
),
Arguments.of(List.of(withName(AUDIO_GER_COMMENTARY, "SDH")),
Arguments.of(List.of(withName(AUDIO_GER_HEARING, "SDH")),
Set.of("SDH"),
Map.ofEntries()
),
@@ -260,7 +260,7 @@ class AttributeChangeProcessorTest {
}
@ParameterizedTest
@MethodSource("findCommentaryTracksAndApplyChanges")
@MethodSource("findHearingImpairedTracksAndApplyChanges")
void findHearingImpairedTracksAndApplyChanges(List<TrackAttributes> tracks, Set<String> keywords, Map<TrackAttributes, Boolean> changes) {
AttributeChangeProcessor attributeChangeProcessor = new AttributeChangeProcessor(new String[]{}, Set.of(), Set.of(), keywords);

View File

@@ -57,6 +57,8 @@ class MkvFileProcessorTest {
"default_track": true,
"enabled_track": true,
"forced_track": false,
"commentary_track": true,
"flag_hearing_impaired": true,
"language": "eng",
"number": 3
},
@@ -88,8 +90,8 @@ class MkvFileProcessorTest {
assertEquals("eng", sub.language());
assertTrue(sub.defaultt());
assertFalse(sub.forced());
assertFalse(sub.hearingImpaired());
assertFalse(sub.commentary());
assertTrue(sub.hearingImpaired());
assertTrue(sub.commentary());
assertEquals(TrackType.SUBTITLES, sub.type());
}