ui: default to sub (jpn) instead of dub for playback

This commit is contained in:
jozamudi committed 2026-08-23 21:28:24 +00:00
1 parent d6bf7e149b
commit 50d30a8d3f
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -255,7 +255,7 @@ def api_episodes(anime_id: int):
@app.get("/api/episode/{ep_id}/stream") @app.get("/api/episode/{ep_id}/stream")
def api_stream(ep_id: int, lang: str = "eng"): def api_stream(ep_id: int, lang: str = "jpn"):
def go(): def go():
master = _upstream(upstream.master_m3u8, ep_id, lang) master = _upstream(upstream.master_m3u8, ep_id, lang)
if not master: if not master:
+3 -3
View File
@@ -6,7 +6,7 @@ const BASE = (() => {
return p.endsWith("/") ? p : p.slice(0, p.lastIndexOf("/") + 1); return p.endsWith("/") ? p : p.slice(0, p.lastIndexOf("/") + 1);
})(); })();
const main = document.getElementById("main"); const main = document.getElementById("main");
let hls = null, detail = null, lang = "eng", seasonId = null; let hls = null, detail = null, lang = "jpn", seasonId = null;
async function api(path) { async function api(path) {
const r = await fetch(BASE + path.replace(/^\//, "")); const r = await fetch(BASE + path.replace(/^\//, ""));
@@ -190,7 +190,7 @@ function initRecent() {
async function showAnime(slug_id, opts = {}) { async function showAnime(slug_id, opts = {}) {
skel(); skel();
detail = await api(`/api/anime/${slug_id}`); detail = await api(`/api/anime/${slug_id}`);
lang = opts.lang || "eng"; lang = opts.lang || "jpn";
seasonId = opts.season || detail.id; seasonId = opts.season || detail.id;
detail.slug_id = slug_id; detail.slug_id = slug_id;
main.innerHTML = ""; main.innerHTML = "";
@@ -528,7 +528,7 @@ function showPlayOverlay(v) {
else if (p.get("anime")) await showAnime(p.get("anime"), { else if (p.get("anime")) await showAnime(p.get("anime"), {
season: p.get("season") ? +p.get("season") : null, season: p.get("season") ? +p.get("season") : null,
ep: p.get("ep") ? +p.get("ep") : null, ep: p.get("ep") ? +p.get("ep") : null,
lang: p.get("lang") || "eng", lang: p.get("lang") || "jpn",
}); });
else if (p.has("history")) await showHistory(); else if (p.has("history")) await showHistory();
else showHome(); else showHome();