diff --git a/src/common/externalPlayerOptions.js b/src/common/externalPlayerOptions.js index 36f530a0b..e1b3938d0 100644 --- a/src/common/externalPlayerOptions.js +++ b/src/common/externalPlayerOptions.js @@ -16,7 +16,13 @@ if (platform.name === 'ios') { { label: 'Just Player', value: 'justplayer' }, { label: 'MX Player', value: 'mxplayer' } ]); -} else if (['windows', 'macos', 'linux'].includes(platform.name)) { +} else if (platform.name === 'macos') { + options = options.concat([ + { label: 'IINA', value: 'iina' }, + { label: 'mpv', value: 'mpv' }, + { label: 'VLC', value: 'vlc' } + ]); +} else if (['windows', 'linux'].includes(platform.name)) { options = options.concat([ { label: 'VLC', value: 'vlc' } ]); diff --git a/src/routes/MetaDetails/StreamsList/Stream/Stream.js b/src/routes/MetaDetails/StreamsList/Stream/Stream.js index be46486a4..a8961cfe0 100644 --- a/src/routes/MetaDetails/StreamsList/Stream/Stream.js +++ b/src/routes/MetaDetails/StreamsList/Stream/Stream.js @@ -15,19 +15,13 @@ const Stream = ({ className, videoId, videoReleased, addonName, name, descriptio const { core } = useServices(); const toast = useToast(); const href = React.useMemo(() => { - const haveStreamingServer = streamingServer.settings !== null && streamingServer.settings.type === 'Ready'; - return deepLinks ? - profile.settings.playerType && profile.settings.playerType !== 'internal' ? - platform.isMobile() || !haveStreamingServer ? - (deepLinks.externalPlayer.openPlayer || {})[platform.name] || deepLinks.externalPlayer.href - : null - : - typeof deepLinks.player === 'string' ? - deepLinks.player - : - null - : - null; + if (!deepLinks) return null; + + if (profile.settings.playerType && profile.settings.playerType !== 'internal') { + return (deepLinks.externalPlayer.openPlayer || {})[platform.name] || deepLinks.externalPlayer.href; + } + + return typeof deepLinks.player === 'string' ? deepLinks.player : null; }, [deepLinks, profile, streamingServer]); const markVideoAsWatched = React.useCallback(() => { if (typeof videoId === 'string') { diff --git a/src/routes/Settings/useProfileSettingsInputs.js b/src/routes/Settings/useProfileSettingsInputs.js index 64b1beb17..5d7d5b87f 100644 --- a/src/routes/Settings/useProfileSettingsInputs.js +++ b/src/routes/Settings/useProfileSettingsInputs.js @@ -211,11 +211,15 @@ const useProfileSettingsInputs = (profile) => { } }), [profile.settings]); const playInExternalPlayerSelect = React.useMemo(() => ({ - options: externalPlayerOptions.map((opt) => { - opt.label = t(opt.label); - return opt; - }), - selected: [`${profile.settings.playerType || 'internal'}`], + options: externalPlayerOptions.map((opt) => ({ + value: opt.value, + label: t(opt.label), + })), + selected: [profile.settings.playerType], + renderLabelText: () => { + const selectedOption = externalPlayerOptions.find(({ value }) => value === profile.settings.playerType); + return selectedOption ? t(selectedOption.label, { defaultValue: selectedOption.label }) : profile.settings.playerType; + }, onSelect: (event) => { core.transport.dispatch({ action: 'Ctx',