From 6ba53ec29a9e0f332173f9827b687505e9b1709d Mon Sep 17 00:00:00 2001 From: Jorrin Date: Sun, 24 Mar 2024 01:04:11 +0100 Subject: [PATCH] only show audio when its available --- src/assets/locales/en.json | 1 + .../player/atoms/settings/SettingsMenu.tsx | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index dc4d6ed1..60c08bfe 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -294,6 +294,7 @@ "enableSubtitles": "Enable Subtitles", "experienceSection": "Viewing experience", "playbackItem": "Playback settings", + "audioItem": "Audio", "qualityItem": "Quality", "sourceItem": "Video sources", "subtitleItem": "Subtitle settings", diff --git a/src/components/player/atoms/settings/SettingsMenu.tsx b/src/components/player/atoms/settings/SettingsMenu.tsx index 8225277b..e47dc6f5 100644 --- a/src/components/player/atoms/settings/SettingsMenu.tsx +++ b/src/components/player/atoms/settings/SettingsMenu.tsx @@ -52,13 +52,15 @@ export function SettingsMenu({ id }: { id: string }) { > {t("player.menus.settings.qualityItem")} - router.navigate("/audio")} - rightText={currentAudioTrack ? currentAudioTrack.label : ""} - > - {/* {t("player.menus.settings.qualityItem")} */} - Audio - + {currentAudioTrack && ( + router.navigate("/audio")} + rightText={currentAudioTrack ? currentAudioTrack.label : ""} + > + {t("player.menus.settings.audioItem")} + + )} + router.navigate("/source")} rightText={sourceName}