Browse Source

Fixes

pull/1086/head
Isra 2 years ago
parent
commit
25452fa01a
  1. 3
      src/stores/banner/BannerLocation.tsx
  2. 2
      src/utils/mobileAppLink.ts

3
src/stores/banner/BannerLocation.tsx

@ -73,7 +73,6 @@ export function BannerLocation(props: { location?: string }) { @@ -73,7 +73,6 @@ export function BannerLocation(props: { location?: string }) {
const [appLink, setAppLink] = useState("");
useEffect(() => {
console.log(meta);
if (meta) {
setAppLink(getMobileAppLink(meta));
} else {
@ -104,7 +103,7 @@ export function BannerLocation(props: { location?: string }) { @@ -104,7 +103,7 @@ export function BannerLocation(props: { location?: string }) {
<LinkedBanner
id="open_app"
type="open_app"
href={meta ? appLink : "movieweb://home"}
href={meta ? appLink : "movieweb://"}
>
{t("navigation.banner.mobile")}
</LinkedBanner>

2
src/utils/mobileAppLink.ts

@ -3,7 +3,7 @@ import { PlayerMeta } from "@/stores/player/slices/source"; @@ -3,7 +3,7 @@ import { PlayerMeta } from "@/stores/player/slices/source";
export function getMobileAppLink(meta: PlayerMeta) {
const url = new URL("movieweb://videoPlayer");
url.searchParams.set("type", meta.type);
url.searchParams.set("type", meta.type === "movie" ? "movie" : "tv");
url.searchParams.set("id", meta.tmdbId);
const isShow = meta.type === "show";

Loading…
Cancel
Save