Skip to content

Commit

Permalink
fix: try media lang first when fallback is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdvlpr committed Dec 6, 2024
1 parent fed424f commit 4f34f2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/helpers/jw-media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1734,10 +1734,13 @@ export async function processMissingMediaInfo(allMedia: MultimediaItem[]) {
const langsWritten = [
...new Set([
/* eslint-disable perfectionist/sort-sets */
currentStateStore.currentSettings?.langFallback &&
currentStateStore.currentSettings?.lang,
media.MepsLanguageIndex !== undefined &&
mepslangs[media.MepsLanguageIndex],
media.AlternativeLanguage,
currentStateStore.currentSettings?.lang,
!currentStateStore.currentSettings?.langFallback &&
currentStateStore.currentSettings?.lang,
currentStateStore.currentSettings?.langFallback,
/* eslint-disable perfectionist/sort-sets */
]),
Expand Down

0 comments on commit 4f34f2d

Please sign in to comment.