refactor/player-parser: change anilibria api url to current version

Translate error messages
This commit is contained in:
Kentai Radiquum 2025-07-09 15:27:13 +05:00
parent 144ef94f88
commit 4701f6f62e
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
3 changed files with 108 additions and 45 deletions

View file

@ -6,7 +6,7 @@ export async function getKodikURL(req, res, url: string) {
let domain = url.replace("https://", "").split("/")[0];
if (!altDomains.includes(domain)) {
asJSON(req, res, { message: "Wrong url provided for player kodik" }, 400);
asJSON(req, res, { message: "KODIK: Неправильная ссылка на плеер" }, 400);
return;
}
@ -45,7 +45,7 @@ export async function getKodikURL(req, res, url: string) {
}
if (!pageRes.ok) {
asJSON(req, res, { message: "KODIK: failed to load page" }, 500);
asJSON(req, res, { message: "KODIK: Не удалось загрузить страницу с плеером" }, 500);
return;
}
@ -54,7 +54,7 @@ export async function getKodikURL(req, res, url: string) {
const urlParamsMatch = urlParamsRe.exec(pageData);
if (!urlParamsMatch || urlParamsMatch.length == 0) {
asJSON(req, res, { message: `KODIK: failed to find data to parse` }, 500);
asJSON(req, res, { message: `KODIK: Не удалось найти данные эпизода` }, 500);
return;
}
@ -86,7 +86,7 @@ export async function getKodikURL(req, res, url: string) {
});
if (!linksRes.ok) {
asJSON(req, res, { message: `KODIK: failed to get links` }, 500);
asJSON(req, res, { message: `KODIK: Не удалось получить прямую ссылку` }, 500);
return;
}