mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
Ensure haveStreamingServer Availability is Satisfied 2
This commit is contained in:
parent
68bba90e30
commit
22aa3a5f15
1 changed files with 2 additions and 2 deletions
|
|
@ -13,8 +13,8 @@ const Stream = ({ className, addonName, name, description, thumbnail, progress,
|
||||||
const profile = useProfile();
|
const profile = useProfile();
|
||||||
const streamingServer = useStreamingServer();
|
const streamingServer = useStreamingServer();
|
||||||
const { core } = useServices();
|
const { core } = useServices();
|
||||||
const haveStreamingServer = streamingServer.settings !== null && streamingServer.settings.type === 'Ready';
|
|
||||||
const href = React.useMemo(() => {
|
const href = React.useMemo(() => {
|
||||||
|
const haveStreamingServer = streamingServer.settings !== null && streamingServer.settings.type === 'Ready';
|
||||||
return deepLinks ?
|
return deepLinks ?
|
||||||
profile.settings.playerType === 'external' ?
|
profile.settings.playerType === 'external' ?
|
||||||
platform.isMobile() || !haveStreamingServer ?
|
platform.isMobile() || !haveStreamingServer ?
|
||||||
|
|
@ -27,7 +27,7 @@ const Stream = ({ className, addonName, name, description, thumbnail, progress,
|
||||||
null
|
null
|
||||||
:
|
:
|
||||||
null;
|
null;
|
||||||
}, [deepLinks, haveStreamingServer]);
|
}, [deepLinks, streamingServer]);
|
||||||
const onClick = React.useCallback((e) => {
|
const onClick = React.useCallback((e) => {
|
||||||
if (href === null) {
|
if (href === null) {
|
||||||
// link does not lead to the player, it is expected to
|
// link does not lead to the player, it is expected to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue