diff --git a/frontend/src/helperDefaults/AniListGetSingleAnime.ts b/frontend/src/helperDefaults/AniListGetSingleAnime.ts
new file mode 100644
index 0000000..5fd955d
--- /dev/null
+++ b/frontend/src/helperDefaults/AniListGetSingleAnime.ts
@@ -0,0 +1,65 @@
+import type {AniListGetSingleAnime} from "../anilist/types/AniListCurrentUserWatchListType";
+
+export const AniListGetSingleAnimeDefaultData: AniListGetSingleAnime = {
+ data: {
+ MediaList: {
+ id: 0,
+ mediaId: 0,
+ userId: 0,
+ media: {
+ id: 0,
+ idMal: 0,
+ title: {
+ romaji: "",
+ english: "",
+ native: "",
+ },
+ description: "",
+ coverImage: {
+ large: "",
+ },
+ season: "",
+ seasonYear: 0,
+ status: "",
+ episodes: 0,
+ nextAiringEpisode: {
+ airingAt: 0,
+ timeUntilAiring: 0,
+ episode: 0,
+ }
+ },
+ status: "",
+ startedAt: {
+ year: 0,
+ month: 0,
+ day: 0,
+ },
+ completedAt: {
+ year: 0,
+ month: 0,
+ day: 0,
+ },
+ notes: "",
+ progress: 0,
+ score: 0,
+ repeat: 0,
+ user: {
+ id: 0,
+ name: "",
+ avatar: {
+ large: "",
+ medium: "",
+ },
+ statistics: {
+ anime: {
+ count: 0,
+ statuses: [{
+ status: "",
+ count: 0,
+ }]
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte b/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte
index 81b35f6..f278c28 100644
--- a/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte
+++ b/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte
@@ -11,21 +11,24 @@
watchListPage.subscribe(value => page = value)
animePerPage.subscribe(value => perPage = value)
- export const CheckIfAniListLoggedInAndLoadWatchList = async () => {
- await CheckIfAniListLoggedIn().then(loggedIn => {
- if (loggedIn) {
- GetAniListLoggedInUser().then(user => {
- aniListUser.set(user)
- if (isAniListPrimary) {
- GetAniListUserWatchingList(page, perPage, MediaListSort.UpdatedTimeDesc).then((watchList) => {
- aniListWatchlist.set(watchList)
- aniListLoggedIn.set(loggedIn)
- })
- } else {
- aniListLoggedIn.set(loggedIn)
- }
- })
- }
+ export const LoadAniListUser = async () => {
+ await GetAniListLoggedInUser().then(user => {
+ aniListUser.set(user)
})
}
+
+ export const LoadAniListWatchList = async () => {
+ await GetAniListUserWatchingList(page, perPage, MediaListSort.UpdatedTimeDesc).then((watchList) => {
+ aniListWatchlist.set(watchList)
+ })
+ }
+
+ export const CheckIfAniListLoggedInAndLoadWatchList = async () => {
+ const loggedIn = await CheckIfAniListLoggedIn()
+ if (loggedIn) {
+ await LoadAniListUser()
+ if (isAniListPrimary) await LoadAniListWatchList()
+ }
+ aniListLoggedIn.set(loggedIn)
+ }
\ No newline at end of file
diff --git a/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte b/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte
index ff10b01..d5f8a8e 100644
--- a/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte
+++ b/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte
@@ -21,8 +21,9 @@
import {type AniListUser, MediaListSort} from "../anilist/types/AniListTypes";
import type {MALAnime, MALWatchlist, MyAnimeListUser} from "../mal/types/MALTypes";
import type {TableItems} from "../helperTypes/TableTypes";
+ import {AniListGetSingleAnimeDefaultData} from "../helperDefaults/AniListGetSingleAnime";
- export let aniListAnime = writable({} as AniListGetSingleAnime)
+ export let aniListAnime = writable(AniListGetSingleAnimeDefaultData)
export let title = writable("")
export let aniListLoggedIn = writable(false)
export let simklLoggedIn = writable(false)
diff --git a/frontend/src/helperTypes/TableTypes.ts b/frontend/src/helperTypes/TableTypes.ts
index 67052ff..d2d5f35 100644
--- a/frontend/src/helperTypes/TableTypes.ts
+++ b/frontend/src/helperTypes/TableTypes.ts
@@ -2,6 +2,7 @@ export type TableItems = TableItem[]
export type TableItem = {
id: number
+ title: string
service: string
progress: number
status: string
diff --git a/frontend/src/routes/AnimeRoutePage.svelte b/frontend/src/routes/AnimeRoutePage.svelte
new file mode 100644
index 0000000..e0bc000
--- /dev/null
+++ b/frontend/src/routes/AnimeRoutePage.svelte
@@ -0,0 +1,9 @@
+
+
+{#key params.id}
+
+{/key}
\ No newline at end of file