mirror of
https://github.com/movie-web/movie-web.git
synced 2025-01-26 09:15:29 +01:00
Fixes
This commit is contained in:
parent
7de093ef20
commit
25452fa01a
@ -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>
|
||||||
|
@ -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";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user