aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Media
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-28 17:25:24 -0800
committerFuwn <[email protected]>2023-12-28 17:25:24 -0800
commitd59b5e92bc2de54d19413d4a21df6e761dac8c69 (patch)
tree332a803fdac2cc0ab8cbabd96a7dccfa2f68f061 /src/lib/Media
parentfeat(html): update description and title (diff)
downloaddue.moe-d59b5e92bc2de54d19413d4a21df6e761dac8c69.tar.xz
due.moe-d59b5e92bc2de54d19413d4a21df6e761dac8c69.zip
chore(manga): no proxy dev
Diffstat (limited to 'src/lib/Media')
-rw-r--r--src/lib/Media/Manga/chapters.ts17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/Media/Manga/chapters.ts b/src/lib/Media/Manga/chapters.ts
index 8d072559..203d7210 100644
--- a/src/lib/Media/Manga/chapters.ts
+++ b/src/lib/Media/Manga/chapters.ts
@@ -1,4 +1,5 @@
import { recentMediaActivities, type Media } from '$lib/AniList/media';
+import proxy from '$lib/Utility/proxy';
import settings from '../../../stores/settings';
import type { UserIdentity } from '../../AniList/identity';
import { database } from '../../Database/chapters';
@@ -41,9 +42,11 @@ const getManga = async (
try {
return await (
await fetch(
- `https://due-proxy.fuwn.workers.dev/?q=https://api.mangadex.org/manga?title=${encodeURIComponent(
- title
- )}&year=${year}&status[]=${status}`
+ proxy(
+ `https://api.mangadex.org/manga?title=${encodeURIComponent(
+ title
+ )}&year=${year}&status[]=${status}`
+ )
)
).json();
} catch {
@@ -124,7 +127,9 @@ export const chapterCount = async (
const mangadexId = mangadexDataJson['data'][0]['id'];
const lastChapterDataJson = await (
await fetch(
- `https://due-proxy.fuwn.workers.dev/?q=https://api.mangadex.org/manga/${mangadexId}/feed?order[chapter]=desc&translatedLanguage[]=en&limit=1&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic`
+ proxy(
+ `https://api.mangadex.org/manga/${mangadexId}/feed?order[chapter]=desc&translatedLanguage[]=en&limit=1&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic`
+ )
)
).json();
@@ -147,7 +152,9 @@ export const chapterCount = async (
if (!settings.get().calculateDisableOutOfDateVolumeWarning) {
const volumeOfChapterData = await (
await fetch(
- `https://due-proxy.fuwn.workers.dev/?q=https://api.mangadex.org/chapter?manga=${mangadexId}&chapter=${manga.mediaListEntry?.progress}&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&limit=1`
+ proxy(
+ `https://api.mangadex.org/chapter?manga=${mangadexId}&chapter=${manga.mediaListEntry?.progress}&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&limit=1`
+ )
)
).json();
let lastAvailableVolume = lastChapterDataJson['data'][0]['attributes']['volume'];