added mangaupdates integration

cleanup db related code
cleanup ui
ui eye candy
This commit is contained in:
wea_ondara
2023-09-26 16:47:08 +02:00
parent 641a4425aa
commit 7f28012520
36 changed files with 1435 additions and 168 deletions

View File

@@ -0,0 +1,8 @@
import {AniListMangaListEntry} from '@/data/models/anilist/AniListMangaListEntry';
export type AniListMangaList = {
name: 'Paused' | 'Completed' | 'Planning' | 'Dropped' | 'Reading',
isCustomList: boolean,
isCompletedList: boolean,
entries: AniListMangaListEntry[]
}

View File

@@ -0,0 +1,6 @@
import type {AniListMangaList} from '@/data/models/anilist/AniListMangaList';
export type AniListMangaListCollection = {
lists: AniListMangaList[]
}

View File

@@ -0,0 +1,21 @@
import type {AniListMedia} from '@/data/models/anilist/AniListMedia';
export type AniListMangaListEntry = {
id: number,
mediaId: number,
status: 'PAUSED' | 'COMPLETED' | 'PLANNING' | 'DROPPED' | 'READING',
score: number,
progress: number,
progressVolumes: number,
repeat: number,
priority: number,
private: boolean,
hiddenFromStatusLists: boolean,
customLists: any,
advancedScores: any,
notes: any,
updatedAt: number
startedAt: any,
completedAt: any,
media: AniListMedia,
}

View File

@@ -0,0 +1,26 @@
export type AniListMedia = {
id: number,
title: {
userPreferred: string,
romaji: string,
english: string,
native: string,
}
coverImage: {
extraLarge: string, //url
large: string, //url
}
type: 'MANGA' | string,
format: 'MANGA' | string,
status: 'RELEASING' | string,
episodes: number | null,
volumes: number | null,
chapters: number | null,
averageScore: number,
popularity: number,
isAdult: boolean,
countryOfOrigin: 'JP' | 'KR' | string,
genres: string[],
bannerImage: string, //url
startDate: any,
}

View File

@@ -0,0 +1,5 @@
export type AniListUser = {
id: number,
name: string,
//...
}

View File

@@ -0,0 +1,91 @@
export type SearchResultRecord = {
'series_id': number,
'title': string,
'url': string,
'description': string,
'image': {
'url': {
'original': string,
'thumb': string
},
'height': number,
'width': number
},
'type': 'Artbook' | 'Doujinshi' | 'Drama CD' | 'Filipino' | 'Indonesian' | 'Manga' | 'Manhwa' | 'Manhua' | 'Novel'
| 'OEL' | 'Thai' | 'Vietnamese' | 'Malaysian' | 'Nordic' | 'French' | 'Spanish',
'year': string,
'bayesian_rating': number,
'rating_votes': number,
'genres': [{
'genre': string
}],
'latest_chapter': number,
'rank': {
'position': {
'week': number,
'month': number,
'three_months': number,
'six_months': number,
'year': number
},
'old_position': {
'week': number,
'month': number,
'three_months': number,
'six_months': number,
'year': number
},
'lists': {
'reading': number,
'wish': number,
'complete': number,
'unfinished': number,
'custom': number
}
},
'last_updated': {
'timestamp': number,
'as_rfc3339': string,
'as_string': string
},
'admin': {
'added_by': {
'user_id': number,
'username': string,
'url': string,
'avatar': {
'id': number,
'url': string,
'height': number,
'width': number
},
'time_joined': {
'timestamp': number,
'as_rfc3339': string,
'as_string': string
},
'signature': string,
'forum_title': string,
'folding_at_home': true,
'profile': {
'upgrade': {
'requested': true,
'reason': string
}
},
'stats': {
'forum_posts': number,
'added_authors': number,
'added_groups': number,
'added_publishers': number,
'added_releases': number,
'added_series': number
},
'user_group': string,
'user_group_name': string
},
'approved': true
}
};

View File

@@ -0,0 +1,5 @@
export type MangaUpdatesChapter = {
series_id: number,
group: string,
chapter: number
}

View File

@@ -0,0 +1,5 @@
export type MangaUpdatesRelation = {
aniListMediaId: number,
mangaUpdatesSeriesId: number
}

View File

@@ -0,0 +1,13 @@
import type {SearchResultRecord} from '@/data/models/mangaupdates/MangaUpdateSearchResult';
import type {MangaUpdatesSearchResultMetaData} from '@/data/models/mangaupdates/MangaUpdatesSearchResultMetaData';
export type MangaUpdatesSearchResult = {
'total_hits': number,
'page': number,
'per_page': number,
'results': [{
'record': SearchResultRecord,
'hit_title': string,
'metadata': MangaUpdatesSearchResultMetaData
}]
}

View File

@@ -0,0 +1,25 @@
export type MangaUpdatesSearchResultMetaData = {
'user_list': {
'series': {
'id': number,
'title': string
},
'list_id': number,
'list_type': string,
'list_icon': string,
'status': {
'volume': number,
'chapter': number
},
'priority': number,
'time_added': {
'timestamp': number,
'as_rfc3339': string,
'as_string': string
}
},
'user_genre_highlights': [{
'genre': string,
'color': string
}]
}

View File

@@ -0,0 +1,67 @@
export type MangaUpdatesSeries = {
'series_id': number,
'title': string,
'url': string,
'associated': { 'title': string }[],
'description': string,
'image': {
'url': {
'original': string,
'thumb': string
},
'height': number,
'width': number
},
'type': 'Artbook' | 'Doujinshi' | 'Drama CD' | 'Filipino' | 'Indonesian' | 'Manga' | 'Manhwa' | 'Manhua' | 'Novel'
| 'OEL' | 'Thai' | 'Vietnamese' | 'Malaysian' | 'Nordic' | 'French' | 'Spanish',
'year': string,
'bayesian_rating': number,
'rating_votes': number,
'genres': { 'genre': string }[],
'categories': { 'series_id': number, 'category': string, 'votes': number, 'votes_plus': number, 'votes_minus': number, 'added_by': number }[],
'latest_chapter': number,
'forum_id': number,
'status': string,
'licensed': true,
'completed': false,
'anime': {
'start': string,
'end': string
},
'related_series': { 'relation_id': number, 'relation_type': string, 'related_series_id': number, 'related_series_name': string, 'triggered_by_relation_id': number }[],
'publishers': { 'publisher_name': string, 'publisher_id': number, 'type': string, 'notes': string }[],
'publications': { 'publication_name': string, 'publisher_name': string, 'publisher_id': number }[],
'recommendations': { 'series_name': string, 'series_id': number, 'weight': number }[],
'category_recommendations': { 'series_name': string, 'series_id': number, 'weight': number }[],
'rank': {
'position':
{
'week': number,
'month': number,
'three_months': number,
'six_months': number,
'year': number
},
'old_position':
{
'week': number,
'month': number,
'three_months': number,
'six_months': number,
'year': number
},
'lists':
{
'reading': number,
'wish': number,
'complete': number,
'unfinished': number,
'custom': number
}
},
'last_updated': {
'timestamp': number,
'as_rfc3339': string,
'as_string': string
}
}

View File

@@ -0,0 +1,25 @@
export type MangaUpdatesSeriesGroups = {
'group_list': {
'group_id': number,
'name': string,
'url': string,
'social': {
'site': string,
'facebook': string,
'twitter': string,
'irc': { 'channel': string, 'server': string },
'forum': string,
'discord': string
},
'active': true
}[],
'release_list': {
'id': number,
'title': string,
'volume': null,
'chapter': string,
'groups': { 'name': string, 'group_id': number }[],
'release_date': string,
'time_added': { 'timestamp': number, 'as_rfc3339': string, 'as_string': string }
}[]
}