a lil oopsie
This commit is contained in:
@@ -2306,7 +2306,7 @@
|
||||
async function checkServerStatus(ip, isDeployed = false) {
|
||||
statusIndicator.textContent = "Connecting...";
|
||||
statusIndicator.className = "status-indicator connecting";
|
||||
const url = isDeployed ? "/identify" : `http://{ip}:7275/identify`;
|
||||
const url = isDeployed ? "/identify" : `https://{ip}:7275/identify`;
|
||||
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
|
||||
@@ -527,7 +527,7 @@
|
||||
// --- State ---
|
||||
const getServerUrl = () => {
|
||||
const extensionServerIp = localStorage.getItem("extension_server_ip") || "localhost";
|
||||
const url = "http://" + extensionServerIp + ":7275";
|
||||
const url = "";
|
||||
console.log("[manga-info] serverUrl=", url);
|
||||
return url;
|
||||
};
|
||||
|
||||
@@ -661,7 +661,7 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const getServerUrl = () => {
|
||||
const extensionServerIp = localStorage.getItem("extension_server_ip") || "localhost";
|
||||
const url = "http://" + extensionServerIp + ":7275";
|
||||
const url = "";
|
||||
console.log("[manga] serverUrl=", url);
|
||||
return url;
|
||||
};
|
||||
|
||||
@@ -560,7 +560,7 @@
|
||||
let currentGenre = { id: null, name: null };
|
||||
let allSearchResults = [];
|
||||
let searchTimeout;
|
||||
const serverUrl = `http://${localStorage.getItem("extension_server_ip") || "localhost"}:7275`;
|
||||
const serverUrl = ``;
|
||||
|
||||
// --- View Management ---
|
||||
function updateToggleIndicator() {
|
||||
|
||||
@@ -1139,7 +1139,7 @@
|
||||
<script>
|
||||
let currentMalId = new URLSearchParams(window.location.search).get("id");
|
||||
const extensionIp = localStorage.getItem("extension_server_ip") || "localhost";
|
||||
let serverUrl = `http://${extensionIp}:7275`;
|
||||
let serverUrl = ``;
|
||||
|
||||
// Assumes the Python backend is available at port 7275 on the extension server or localhost.
|
||||
const THEMES_API = serverUrl + "/api/themes";
|
||||
|
||||
@@ -904,11 +904,7 @@
|
||||
const extensionServerItem = document.getElementById("extensionServerItem");
|
||||
|
||||
function getApiUrl(path) {
|
||||
const isDeployed = window.location.protocol.startsWith("http");
|
||||
if (isDeployed) return path;
|
||||
const ip = localStorage.getItem("extension_server_ip");
|
||||
if (!ip) { console.error("Extension IP not found."); return null; }
|
||||
return `http://${ip}:7275${path}`;
|
||||
return "";
|
||||
}
|
||||
|
||||
async function initialize() {
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
const [jikanInfoResp, jikanEpisodesResp, kitsuMapResp] = await Promise.all([
|
||||
fetch(`https://api.jikan.moe/v4/anime/${jikanId}`),
|
||||
fetch(`https://api.jikan.moe/v4/anime/${jikanId}/episodes`),
|
||||
fetch(`http://${serverIp}:7275/map/mal/${jikanId}`)
|
||||
fetch(`/map/mal/${jikanId}`)
|
||||
]);
|
||||
|
||||
if (jikanInfoResp.ok) {
|
||||
@@ -430,7 +430,7 @@
|
||||
|
||||
async function populateSourceChanger() {
|
||||
try {
|
||||
const response = await fetch(`http://${serverIp}:7275/modules/streaming`);
|
||||
const response = await fetch(`/modules/streaming`);
|
||||
if (!response.ok) throw new Error('Failed to fetch streaming modules');
|
||||
const modules = await response.json();
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
loadingContainer.style.display = 'flex';
|
||||
}
|
||||
|
||||
let iframeSrcURL = `http://${serverIp}:7275/iframe-src?mal_id=${jikanId}&episode=${episode}&dub=${dub}`;
|
||||
let iframeSrcURL = `/iframe-src?mal_id=${jikanId}&episode=${episode}&dub=${dub}`;
|
||||
if (preferModule && preferModule !== 'default') {
|
||||
iframeSrcURL += `&prefer_module=${encodeURIComponent(preferModule)}`;
|
||||
}
|
||||
|
||||
2
app.py
2
app.py
@@ -892,7 +892,7 @@ async def download_manga_chapter_as_pdf_full(source: str, manga_id: str, chapter
|
||||
total_h = 0
|
||||
width = 595
|
||||
for u in urls:
|
||||
full_u = u if u.startswith("http") else f"http://localhost:7275{u}"
|
||||
full_u = u if u.startswith("http") else f"https://localhost{u}"
|
||||
res = await tunnel_request("GET", full_u)
|
||||
img = Image.open(io.BytesIO(base64.b64decode(res["body"]))).convert("RGB")
|
||||
new_h = int(width * (img.height / img.width))
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
let source, mangaId, chapterId;
|
||||
let chapterData = null;
|
||||
const serverIp = localStorage.getItem("extension_server_ip") || "localhost";
|
||||
const serverUrl = `http://${serverIp}:7275`;
|
||||
const serverUrl = ``;
|
||||
const READER_MODE_KEY = "reader_view_mode";
|
||||
const HISTORY_KEY = "reading_history";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user