mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
VLC button is showing only in standalone apps now. Not in mobile browser. Default state is false for VLC setting
This commit is contained in:
@@ -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'
|
||||
) : (
|
||||
<>
|
||||
<div>{isVlcUsed.toString()}</div>
|
||||
<TableStyle>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -135,7 +136,7 @@ const Table = memo(
|
||||
{t('Preload')}
|
||||
</Button>
|
||||
|
||||
{isVlcUsed ? (
|
||||
{isVlcUsed && isStandaloneApp ? (
|
||||
<a style={{ textDecoration: 'none' }} href={`vlc://${link}`}>
|
||||
<Button style={{ width: '100%' }} variant='outlined' color='primary' size='small'>
|
||||
VLC
|
||||
|
||||
@@ -32,7 +32,7 @@ export default function SettingsDialog({ handleClose }) {
|
||||
const [cachePercentage, setCachePercentage] = useState(40)
|
||||
const [preloadCachePercentage, setPreloadCachePercentage] = useState(0)
|
||||
const [isProMode, setIsProMode] = useState(JSON.parse(localStorage.getItem('isProMode')) || false)
|
||||
const [isVlcUsed, setIsVlcUsed] = useState(JSON.parse(localStorage.getItem('isVlcUsed')) ?? true)
|
||||
const [isVlcUsed, setIsVlcUsed] = useState(JSON.parse(localStorage.getItem('isVlcUsed')) ?? false)
|
||||
|
||||
useEffect(() => {
|
||||
axios.post(settingsHost(), { action: 'get' }).then(({ data }) => {
|
||||
|
||||
Reference in New Issue
Block a user