From 803b59a291f820d72576f67755014823977e473a Mon Sep 17 00:00:00 2001 From: Daniel Shleifman Date: Wed, 14 Sep 2022 21:13:38 +0300 Subject: [PATCH] VLC button is showing only in standalone apps now. Not in mobile browser. Default state is false for VLC setting --- .../components/DialogTorrentDetailsContent/Table/index.jsx | 7 ++++--- web/src/components/Settings/SettingsDialog.jsx | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/components/DialogTorrentDetailsContent/Table/index.jsx b/web/src/components/DialogTorrentDetailsContent/Table/index.jsx index 2091b5a..953c16f 100644 --- a/web/src/components/DialogTorrentDetailsContent/Table/index.jsx +++ b/web/src/components/DialogTorrentDetailsContent/Table/index.jsx @@ -1,6 +1,6 @@ import { streamHost } from 'utils/Hosts' import isEqual from 'lodash/isEqual' -import { humanizeSize } from 'utils/Utils' +import { humanizeSize, isStandaloneApp } from 'utils/Utils' import ptt from 'parse-torrent-title' import { Button } from '@material-ui/core' import CopyToClipboard from 'react-copy-to-clipboard' @@ -28,12 +28,13 @@ const Table = memo( // if files in list is more then 1 and no season text detected by ptt.parse, show full name const shouldDisplayFullFileName = playableFileList?.length > 1 && !fileHasEpisodeText - const isVlcUsed = JSON.parse(localStorage.getItem('isVlcUsed')) ?? true + const isVlcUsed = JSON.parse(localStorage.getItem('isVlcUsed')) ?? false return !playableFileList?.length ? ( 'No playable files in this torrent' ) : ( <> +
{isVlcUsed.toString()}
@@ -135,7 +136,7 @@ const Table = memo( {t('Preload')} - {isVlcUsed ? ( + {isVlcUsed && isStandaloneApp ? (