aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-10 02:41:17 -0800
committerFuwn <[email protected]>2023-12-10 02:41:17 -0800
commit24efc4f1ec7c8f537653cc7da16fcafe480d94d0 (patch)
treeb88e99c9c4edb437c6241777892f5bc5772063e0 /src
parentfeat(mangadex): add safe rate limits (diff)
downloaddue.moe-24efc4f1ec7c8f537653cc7da16fcafe480d94d0.tar.xz
due.moe-24efc4f1ec7c8f537653cc7da16fcafe480d94d0.zip
feat(manga): lighter rate-limits
Diffstat (limited to 'src')
-rw-r--r--src/lib/List/Manga/MangaListTemplate.svelte2
-rw-r--r--src/routes/settings/+page.svelte4
-rw-r--r--src/stores/settings.ts2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte
index c6ea8b7d..54009e50 100644
--- a/src/lib/List/Manga/MangaListTemplate.svelte
+++ b/src/lib/List/Manga/MangaListTemplate.svelte
@@ -50,7 +50,7 @@
if (
(currentDate.getTime() - $lastPruneTimes.chapters) / 1000 / 60 >
- $settings.cacheMangaMinutes
+ Math.max($settings.cacheMangaMinutes, 5)
) {
const unresolved = await chapterDatabase.chapters.where('chapters').equals(-1).toArray();
const ids = unresolved.map((m) => m.id);
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte
index cfedfd73..7f91d929 100644
--- a/src/routes/settings/+page.svelte
+++ b/src/routes/settings/+page.svelte
@@ -243,9 +243,9 @@
<input
type="number"
bind:value={$settings.cacheMangaMinutes}
- min="1"
+ min="5"
max="1440"
- placeholder="60"
+ placeholder="120"
/>
minutes
<SettingHint lineBreak>
diff --git a/src/stores/settings.ts b/src/stores/settings.ts
index ca081058..c105fbb5 100644
--- a/src/stores/settings.ts
+++ b/src/stores/settings.ts
@@ -56,7 +56,7 @@ const defaultSettings: Settings = {
guessMethod: 'median',
// Cache
- cacheMangaMinutes: 60,
+ cacheMangaMinutes: 120,
cacheMinutes: 30
};