mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-26 07:11:50 +01:00
Fix title
This commit is contained in:
parent
3696a05e1e
commit
a99437b4cc
@ -1,6 +1,6 @@
|
|||||||
window.__CONFIG__ = {
|
window.__CONFIG__ = {
|
||||||
// url must NOT end with a slash
|
// url must NOT end with a slash
|
||||||
VITE_CORS_PROXY_URL: "https://rough.isra.workers.dev",
|
VITE_CORS_PROXY_URL: "",
|
||||||
|
|
||||||
VITE_TMDB_API_KEY: "b030404650f279792a8d3287232358e3",
|
VITE_TMDB_API_KEY: "b030404650f279792a8d3287232358e3",
|
||||||
VITE_OMDB_API_KEY: "aa0937c0",
|
VITE_OMDB_API_KEY: "aa0937c0",
|
||||||
|
@ -5,8 +5,7 @@ import { MWStreamType } from "@/backend/helpers/streams";
|
|||||||
import { normalizeTitle } from "@/utils/normalizeTitle";
|
import { normalizeTitle } from "@/utils/normalizeTitle";
|
||||||
import { useIsMobile } from "@/hooks/useIsMobile";
|
import { useIsMobile } from "@/hooks/useIsMobile";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useMeta } from "@/video/state/logic/meta";
|
||||||
import { useCurrentSeriesEpisodeInfo } from "../hooks/useCurrentSeriesEpisodeInfo";
|
|
||||||
import { VideoPlayerIconButton } from "../parts/VideoPlayerIconButton";
|
import { VideoPlayerIconButton } from "../parts/VideoPlayerIconButton";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@ -16,25 +15,20 @@ interface Props {
|
|||||||
export function DownloadAction(props: Props) {
|
export function DownloadAction(props: Props) {
|
||||||
const descriptor = useVideoPlayerDescriptor();
|
const descriptor = useVideoPlayerDescriptor();
|
||||||
const sourceInterface = useSource(descriptor);
|
const sourceInterface = useSource(descriptor);
|
||||||
const { isSeries, humanizedEpisodeId, meta } =
|
|
||||||
useCurrentSeriesEpisodeInfo(descriptor);
|
|
||||||
const { isMobile } = useIsMobile();
|
const { isMobile } = useIsMobile();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const meta = useMeta(descriptor);
|
||||||
|
|
||||||
/* if (!meta) return null;
|
|
||||||
|
|
||||||
const title = isSeries
|
|
||||||
? `${meta?.meta.title} - ${humanizedEpisodeId}`
|
|
||||||
: meta?.meta.title;
|
|
||||||
*/
|
|
||||||
const isHLS = sourceInterface.source?.type === MWStreamType.HLS;
|
const isHLS = sourceInterface.source?.type === MWStreamType.HLS;
|
||||||
|
|
||||||
|
const title = meta?.meta.meta.title;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
href={isHLS ? undefined : sourceInterface.source?.url}
|
href={isHLS ? undefined : sourceInterface.source?.url}
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
// download={normalizeTitle(title)}
|
download={title ? normalizeTitle(title) : undefined}
|
||||||
>
|
>
|
||||||
<VideoPlayerIconButton
|
<VideoPlayerIconButton
|
||||||
className={props.className}
|
className={props.className}
|
||||||
|
Loading…
Reference in New Issue
Block a user