api/match: ignore subtitleLang if it's "none"

This commit is contained in:
wukko 2025-06-20 14:35:14 +06:00
parent 2396462c5c
commit eb249a3eed
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -73,6 +73,9 @@ export default async function({ host, patternMatch, params, isSession, isApiKey
youtubeHLS = false; youtubeHLS = false;
} }
const subtitleLang =
params.subtitleLang !== "none" ? params.subtitleLang : undefined;
switch (host) { switch (host) {
case "twitter": case "twitter":
r = await twitter({ r = await twitter({
@ -114,7 +117,7 @@ export default async function({ host, patternMatch, params, isSession, isApiKey
isAudioMuted, isAudioMuted,
dubLang: params.youtubeDubLang, dubLang: params.youtubeDubLang,
youtubeHLS, youtubeHLS,
subtitleLang: params.subtitleLang, subtitleLang,
} }
if (url.hostname === "music.youtube.com" || isAudioOnly) { if (url.hostname === "music.youtube.com" || isAudioOnly) {