diff options
| -rw-r--r-- | src/lib/List/Manga/CleanMangaList.svelte | 2 | ||||
| -rw-r--r-- | src/lib/List/Manga/MangaListTemplate.svelte | 2 | ||||
| -rw-r--r-- | src/lib/Media/Manga/chapters.ts (renamed from src/lib/Media/manga.ts) | 9 | ||||
| -rw-r--r-- | src/lib/Media/Manga/volumes.ts | 5 | ||||
| -rw-r--r-- | src/lib/Tools/Wrapped.svelte | 2 | ||||
| -rw-r--r-- | src/routes/user/[user]/+page.svelte | 2 |
6 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte index 40082809..b0e7947e 100644 --- a/src/lib/List/Manga/CleanMangaList.svelte +++ b/src/lib/List/Manga/CleanMangaList.svelte @@ -1,7 +1,7 @@ <script lang="ts"> import type { Media } from '$lib/AniList/media'; import Error from '$lib/Error.svelte'; - import { volumeCount } from '$lib/Media/manga'; + import { volumeCount } from '$lib/Media/Manga/volumes'; import { outboundLink } from '$lib/Media/media'; import settings from '../../../stores/settings'; import ListTitle from '../ListTitle.svelte'; diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte index 822c7343..5fdb2bf5 100644 --- a/src/lib/List/Manga/MangaListTemplate.svelte +++ b/src/lib/List/Manga/MangaListTemplate.svelte @@ -2,7 +2,7 @@ import { mediaListCollection, Type, type Media } from '$lib/AniList/media'; import type { UserIdentity, AniListAuthorisation } from '$lib/AniList/identity'; import { onDestroy, onMount } from 'svelte'; - import { chapterCount } from '$lib/Media/manga'; + import { chapterCount } from '$lib/Media/Manga/chapters'; import { pruneAllManga } from '$lib/Media/Manga/cache'; import manga from '../../../stores/manga'; import { chapterDatabase } from '$lib/Media/Manga/database'; diff --git a/src/lib/Media/manga.ts b/src/lib/Media/Manga/chapters.ts index 95d45697..4e2971c9 100644 --- a/src/lib/Media/manga.ts +++ b/src/lib/Media/Manga/chapters.ts @@ -1,10 +1,7 @@ import { recentMediaActivities, type Media } from '$lib/AniList/media'; -import settings from '../../stores/settings'; -import type { UserIdentity } from '../AniList/identity'; -import { chapterDatabase } from './Manga/database'; - -export const volumeCount = async (manga: Media): Promise<number | null> => - (await chapterDatabase.chapters.get(manga.id))?.volumes as number | null; +import settings from '../../../stores/settings'; +import type { UserIdentity } from '../../AniList/identity'; +import { chapterDatabase } from './database'; export const chapterCount = async ( identity: UserIdentity, diff --git a/src/lib/Media/Manga/volumes.ts b/src/lib/Media/Manga/volumes.ts new file mode 100644 index 00000000..ea2c3ed9 --- /dev/null +++ b/src/lib/Media/Manga/volumes.ts @@ -0,0 +1,5 @@ +import type { Media } from '$lib/AniList/media'; +import { chapterDatabase } from './database'; + +export const volumeCount = async (manga: Media): Promise<number | null> => + (await chapterDatabase.chapters.get(manga.id))?.volumes as number | null; diff --git a/src/lib/Tools/Wrapped.svelte b/src/lib/Tools/Wrapped.svelte index e18f2359..41f904d9 100644 --- a/src/lib/Tools/Wrapped.svelte +++ b/src/lib/Tools/Wrapped.svelte @@ -17,7 +17,7 @@ import { page } from '$app/stores'; import { clearAllParameters } from './tool.js'; import { env } from '$env/dynamic/public'; - import { estimatedDayReading } from '$lib/Media/manga.js'; + import { estimatedDayReading } from '$lib/Media/Manga/chapters.js'; export let user: AniListAuthorisation; diff --git a/src/routes/user/[user]/+page.svelte b/src/routes/user/[user]/+page.svelte index 171d4e5c..e91259d0 100644 --- a/src/routes/user/[user]/+page.svelte +++ b/src/routes/user/[user]/+page.svelte @@ -1,6 +1,6 @@ <script lang="ts"> import { user, type User } from '$lib/AniList/user'; - import { estimatedDayReading } from '$lib/Media/manga.js'; + import { estimatedDayReading } from '$lib/Media/Manga/chapters.js'; import { onMount } from 'svelte'; export let data; |