hide mediasession setting on desktop non-windows

This commit is contained in:
jeffvli 2025-10-12 15:53:16 -07:00
parent 1081829aa4
commit 40e7eda882

View file

@ -1,3 +1,4 @@
import isElectron from 'is-electron';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { import {
@ -7,6 +8,9 @@ import {
import { usePlaybackSettings, useSettingsStoreActions } from '/@/renderer/store/settings.store'; import { usePlaybackSettings, useSettingsStoreActions } from '/@/renderer/store/settings.store';
import { Switch } from '/@/shared/components/switch/switch'; import { Switch } from '/@/shared/components/switch/switch';
const isWindows = window.api.utils.isWindows();
const isDesktop = isElectron();
export const MediaSessionSettings = () => { export const MediaSessionSettings = () => {
const { t } = useTranslation(); const { t } = useTranslation();
const { mediaSession } = usePlaybackSettings(); const { mediaSession } = usePlaybackSettings();
@ -31,6 +35,7 @@ export const MediaSessionSettings = () => {
context: 'description', context: 'description',
postProcess: 'sentenceCase', postProcess: 'sentenceCase',
}), }),
isHidden: isDesktop && !isWindows,
note: t('common.restartRequired', { postProcess: 'sentenceCase' }), note: t('common.restartRequired', { postProcess: 'sentenceCase' }),
title: t('setting.mediaSession', { postProcess: 'sentenceCase' }), title: t('setting.mediaSession', { postProcess: 'sentenceCase' }),
}, },