Fix: zu weite Deutsch-Erkennung konnte falsche Tonspur behalten
- isGermanStream: Titel-Fallback nur noch ganze Woerter (german/deutsch); die 2-3-Buchstaben-Codes ger/deu sind im freien Titel-Text mehrdeutig und konnten die falsche Spur als "deutsch" picken (und damit die echte deutsche loeschen). Der Sprach-Tag-Check (ger/deu/de) bleibt unveraendert. - looksLikeGermanRelease: 'dubbed' entfernt — ein nacktes "Dubbed" kann ein italienischer/franzoesischer Dub sein und darf den German-first-Fallback nicht ausloesen. Explizite german/deutsch-Tokens reichen. - 2 Negativtests (3-Letter-Titel-Code, nicht-deutscher Dub).
This commit is contained in:
@@ -85,6 +85,13 @@ describe("pickAudioTrack", () => {
|
||||
expect(d).toMatchObject({ action: "remux", audioRelIndex: 1 });
|
||||
});
|
||||
|
||||
it("tag mode does NOT treat an ambiguous 3-letter title code as German (no false-positive pick)", () => {
|
||||
// Two untagged tracks whose titles are only "Ger"/"Deu" must not be mistaken
|
||||
// for a German track; with no real German signal this falls back to first.
|
||||
const d = pickAudioTrack([{ language: "", title: "Ger" }, { language: "", title: "Deu" }], "tag");
|
||||
expect(d).toMatchObject({ action: "remux", audioRelIndex: 0, reason: "fallback-first-untagged" });
|
||||
});
|
||||
|
||||
it("tag mode with single German -> single (no remux)", () => {
|
||||
expect(pickAudioTrack([ger], "tag")).toMatchObject({ action: "single" });
|
||||
});
|
||||
@@ -125,6 +132,10 @@ describe("looksLikeGermanRelease", () => {
|
||||
expect(looksLikeGermanRelease("Show.S01E01.DL.720p.x264.mkv")).toBe(false);
|
||||
expect(looksLikeGermanRelease("Show.S01E01.MULTi.1080p.mkv")).toBe(false);
|
||||
});
|
||||
it("does not flag a non-German dub as a German release (bare 'Dubbed' is ambiguous)", () => {
|
||||
expect(looksLikeGermanRelease("Movie.2020.ITALIAN.Dubbed.DL.1080p.mkv")).toBe(false);
|
||||
expect(looksLikeGermanRelease("Movie.2020.FRENCH.DUBBED.DL.720p.mkv")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("parseFfprobeAudioStreams", () => {
|
||||
|
||||
Reference in New Issue
Block a user