This commit is contained in:
Isra 2024-04-04 19:52:49 -05:00
parent 7de093ef20
commit 25452fa01a
2 changed files with 2 additions and 3 deletions

View File

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

View File

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