From 18b9b7c746452f30c70c7a19e83322839b3bb753 Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Tue, 30 May 2023 17:16:54 +0200 Subject: [PATCH] fix(settings): mpv player is only available in electron app --- src/app/settings/settings.component.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index 3c2bd7d7b..06da0d450 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -37,6 +37,9 @@ export class SettingsComponent implements OnInit { /** List with available languages as enum */ languageEnum = Language; + /** Flag that indicates whether the app runs in electron environment */ + isElectron = this.electronService.isElectron; + /** Player options */ players = [ { @@ -47,10 +50,14 @@ export class SettingsComponent implements OnInit { id: VideoPlayer.VideoJs, label: 'VideoJs Player', }, - { - id: VideoPlayer.MPV, - label: 'MPV Player', - }, + ...(this.isElectron + ? [ + { + id: VideoPlayer.MPV, + label: 'MPV Player', + }, + ] + : []), ]; /** Current version of the app */ @@ -62,9 +69,6 @@ export class SettingsComponent implements OnInit { /** EPG availability flag */ epgAvailable$ = this.store.select(selectIsEpgAvailable); - /** Flag that indicates whether the app runs in electron environment */ - isElectron = this.electronService.isElectron; - /** All available visual themes */ themeEnum = Theme;