Fix title

This commit is contained in:
zisra 2023-02-21 15:07:40 -06:00
parent 3696a05e1e
commit a99437b4cc
2 changed files with 6 additions and 12 deletions

View File

@ -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",

View File

@ -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}