mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
add pretty language to menu selection
This commit is contained in:
parent
dbb1c19796
commit
e19ac55847
1 changed files with 6 additions and 1 deletions
|
@ -36,6 +36,11 @@ export function SettingsMenu({ id }: { id: string }) {
|
||||||
t("player.menus.subtitles.unknownLanguage")
|
t("player.menus.subtitles.unknownLanguage")
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
|
const selectedAudioLanguagePretty = currentAudioTrack
|
||||||
|
? getPrettyLanguageNameFromLocale(currentAudioTrack.language) ??
|
||||||
|
t("player.menus.subtitles.unknownLanguage")
|
||||||
|
: undefined;
|
||||||
|
|
||||||
const source = usePlayerStore((s) => s.source);
|
const source = usePlayerStore((s) => s.source);
|
||||||
|
|
||||||
const downloadable = source?.type === "file" || source?.type === "hls";
|
const downloadable = source?.type === "file" || source?.type === "hls";
|
||||||
|
@ -55,7 +60,7 @@ export function SettingsMenu({ id }: { id: string }) {
|
||||||
{currentAudioTrack && (
|
{currentAudioTrack && (
|
||||||
<Menu.ChevronLink
|
<Menu.ChevronLink
|
||||||
onClick={() => router.navigate("/audio")}
|
onClick={() => router.navigate("/audio")}
|
||||||
rightText={currentAudioTrack ? currentAudioTrack.label : ""}
|
rightText={selectedAudioLanguagePretty ?? undefined}
|
||||||
>
|
>
|
||||||
{t("player.menus.settings.audioItem")}
|
{t("player.menus.settings.audioItem")}
|
||||||
</Menu.ChevronLink>
|
</Menu.ChevronLink>
|
||||||
|
|
Loading…
Reference in a new issue