diff --git a/src/backend/providers/m4ufree.ts b/src/backend/providers/m4ufree.ts
index 78cc2d15..76e558db 100644
--- a/src/backend/providers/m4ufree.ts
+++ b/src/backend/providers/m4ufree.ts
@@ -29,6 +29,7 @@ registerProvider({
id: "m4ufree",
displayName: "m4ufree",
rank: -1,
+ disabled: true, // Disables because the redirector URLs it returns will throw 404 / 403 depending on if you view it in the browser or fetch it respectively. It just does not work.
type: [MWMediaType.MOVIE, MWMediaType.SERIES],
async scrape({ media, progress, type, episode: episodeId, season: seasonId }) {
diff --git a/src/index.tsx b/src/index.tsx
index a6bbd66c..3a8d7594 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,6 +1,6 @@
-import React, { Suspense } from "react";
+import React, { ReactNode, Suspense } from "react";
import ReactDOM from "react-dom";
-import { HashRouter } from "react-router-dom";
+import { BrowserRouter, HashRouter } from "react-router-dom";
import { ErrorBoundary } from "@/components/layout/ErrorBoundary";
import { conf } from "@/setup/config";
@@ -42,14 +42,22 @@ const LazyLoadedApp = React.lazy(async () => {
};
});
+function TheRouter(props: { children: ReactNode }) {
+ const normalRouter = conf().NORMAL_ROUTER;
+
+ if (normalRouter)
+ return
+ return
+}
+
ReactDOM.render(
-
+
-
+
,
document.getElementById("root")
diff --git a/src/setup/config.ts b/src/setup/config.ts
index 951be497..72a762f5 100644
--- a/src/setup/config.ts
+++ b/src/setup/config.ts
@@ -7,6 +7,7 @@ interface Config {
OMDB_API_KEY: string;
TMDB_API_KEY: string;
CORS_PROXY_URL: string;
+ NORMAL_ROUTER: boolean;
}
export interface RuntimeConfig extends Config {
@@ -20,6 +21,7 @@ const env: Record = {
GITHUB_LINK: undefined,
DISCORD_LINK: undefined,
CORS_PROXY_URL: import.meta.env.VITE_CORS_PROXY_URL,
+ NORMAL_ROUTER: import.meta.env.VITE_NORMAL_ROUTER,
};
const alerts = [] as string[];
@@ -51,5 +53,6 @@ export function conf(): RuntimeConfig {
TMDB_API_KEY: getKey("TMDB_API_KEY"),
BASE_PROXY_URL: getKey("CORS_PROXY_URL"),
CORS_PROXY_URL: `${getKey("CORS_PROXY_URL")}/?destination=`,
+ NORMAL_ROUTER: (getKey("NORMAL_ROUTER") ?? "false") === "true",
};
}