Skip to content

Commit ac8f087

Browse files
committed
vidsrc is the new non anime default source
- vidsrc is now the new non_anime_default source instead of videasy - replaced hardcoded videasy fallback with NON_ANIME_DEFAULT_SOURCE variable - removed uneccessary variables and imports
1 parent 9e99894 commit ac8f087

5 files changed

Lines changed: 7 additions & 15 deletions

File tree

src/pages/DownloadsPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
WatchedIcon,
99
SubtitlesIcon,
1010
} from "../components/Icons";
11-
import { storage, STORAGE_KEYS, isElectron } from "../utils/storage";
11+
import { storage, isElectron } from "../utils/storage";
1212
import SubtitleDownloaderModal from "../components/SubtitleDownloaderModal";
1313
import { imgUrl } from "../utils/api";
1414

src/pages/MoviePage.jsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default function MoviePage({
7676
const [m3u8Url, setM3u8Url] = useState(null);
7777
const [interceptedSubs, setInterceptedSubs] = useState([]);
7878
const [playerSource, setPlayerSource] = useState(
79-
() => storage.get("playerSource") || "videasy",
79+
() => storage.get("playerSource") || NON_ANIME_DEFAULT_SOURCE,
8080
);
8181
const progressViaFrames = useMemo(
8282
() => sourceProgressViaFrames(playerSource),
@@ -824,14 +824,7 @@ export default function MoviePage({
824824
src={
825825
sourceIsAsync(playerSource)
826826
? resolvedPlayerUrl || "about:blank"
827-
: getSourceUrl(
828-
playerSource,
829-
"movie",
830-
item.id,
831-
null,
832-
null,
833-
title,
834-
)
827+
: getSourceUrl(playerSource, "movie", item.id, null, null)
835828
}
836829
partition="persist:player"
837830
allowpopups="false"

src/pages/SettingsPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { DEFAULT_INVIDIOUS_BASE } from "../components/TrailerModal";
1212
import { RATING_COUNTRIES } from "../utils/ageRating";
1313
import { WarningIcon } from "../components/Icons";
1414
import { checkForUpdates } from "../utils/updates";
15-
import { HOME_ROWS, loadHomeLayout, saveHomeLayout } from "../utils/homeLayout";
15+
import { HOME_ROWS, loadHomeLayout } from "../utils/homeLayout";
1616
import { collectBackupData, restoreBackupData } from "../utils/backup";
1717
import { formatBytes } from "../utils/storage";
1818

src/pages/TVPage.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export default function TVPage({
377377
const [m3u8Url, setM3u8Url] = useState(null);
378378
const [interceptedSubs, setInterceptedSubs] = useState([]);
379379
const [playerSource, setPlayerSource] = useState(
380-
() => storage.get("playerSource") || "videasy",
380+
() => storage.get("playerSource") || NON_ANIME_DEFAULT_SOURCE,
381381
);
382382
const [showSourceMenu, setShowSourceMenu] = useState(false);
383383
// Derived from playerSource, computed once per render instead of 5-6× inline
@@ -1423,7 +1423,6 @@ export default function TVPage({
14231423
item.id,
14241424
playerEp.season,
14251425
playerEp.episode,
1426-
title,
14271426
)
14281427
}
14291428
partition="persist:player"

src/utils/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const PLAYER_SOURCES = [
133133
},
134134
];
135135

136-
export const getSourceUrl = (sourceId, type, id, season, ep, _title) => {
136+
export const getSourceUrl = (sourceId, type, id, season, ep) => {
137137
const src =
138138
PLAYER_SOURCES.find((s) => s.id === sourceId) ?? PLAYER_SOURCES[0];
139139
return type === "movie" ? src.movieUrl(id) : src.tvUrl(id, season, ep);
@@ -360,7 +360,7 @@ export const isAnimeContent = (item, details) => {
360360

361361
// Default sources
362362
export const ANIME_DEFAULT_SOURCE = "allmanga";
363-
export const NON_ANIME_DEFAULT_SOURCE = "videasy";
363+
export const NON_ANIME_DEFAULT_SOURCE = "vidsrc";
364364

365365
// ── Episode Group fetch (localStorage + in-memory cache, 7-day TTL) ─────────
366366
// Episode groups almost never change, so we cache aggressively across sessions.

0 commit comments

Comments
 (0)