···44 VITE_CORS_PROXY_URL: "",
5566 // The READ API key to access TMDB
77- VITE_TMDB_READ_API_KEY: "CHANGEME",
77+ VITE_TMDB_READ_API_KEY: "",
8899 // The DMCA email displayed in the footer, null to hide the DMCA link
1010 VITE_DMCA_EMAIL: null,
···1616 VITE_BACKEND_URL: null,
17171818 // A comma separated list of disallowed IDs in the case of a DMCA claim - in the format "series-<id>" and "movie-<id>"
1919- VITE_DISALLOWED_IDS: ""
1919+ VITE_DISALLOWED_IDS: "",
2020};
+5-1
src/backend/metadata/tmdb.ts
···144144145145const baseURL = "https://api.themoviedb.org/3";
146146147147+const apiKey = conf().TMDB_READ_API_KEY;
148148+147149const headers = {
148150 accept: "application/json",
149149- Authorization: `Bearer ${conf().TMDB_READ_API_KEY}`,
151151+ Authorization: `Bearer ${apiKey}`,
150152};
151153152154async function get<T>(url: string, params?: object): Promise<T> {
155155+ if (!apiKey) throw new Error("TMDB API key not set");
156156+153157 const res = await mwFetch<any>(encodeURI(url), {
154158 headers,
155159 baseURL,
+1-1
src/hooks/auth/useBackendUrl.ts
···11import { conf } from "@/setup/config";
22import { useAuthStore } from "@/stores/auth";
3344-export function useBackendUrl(): string | undefined {
44+export function useBackendUrl(): string | null {
55 const backendUrl = useAuthStore((s) => s.backendUrl);
66 return backendUrl ?? conf().BACKEND_URL;
77}