rewrote the Anime.svelte to move out helper functions and clean up code
This commit is contained in:
@ -188,7 +188,7 @@ export namespace main {
|
||||
updated_at: updatedAt;
|
||||
media_type: mediaType;
|
||||
status: status;
|
||||
my_list_status: myListStatus;
|
||||
my_list_status: MalListStatus;
|
||||
num_episodes: numEpisodes;
|
||||
start_season: startSeason;
|
||||
broadcast: broadcast;
|
||||
@ -311,6 +311,40 @@ export namespace main {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export class MalListStatus {
|
||||
status: status;
|
||||
score: score;
|
||||
num_episodes_watched: numEpisodesWatched;
|
||||
is_rewatching: isRewatching;
|
||||
start_date: startDate;
|
||||
finish_date: finishDate;
|
||||
priority: priority;
|
||||
num_times_rewatched: numTimesRewatched;
|
||||
rewatch_value: rewatchValue;
|
||||
tags: tags;
|
||||
comments: comments;
|
||||
updated_at: updatedAt;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new MalListStatus(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.status = source["status"];
|
||||
this.score = source["score"];
|
||||
this.num_episodes_watched = source["num_episodes_watched"];
|
||||
this.is_rewatching = source["is_rewatching"];
|
||||
this.start_date = source["start_date"];
|
||||
this.finish_date = source["finish_date"];
|
||||
this.priority = source["priority"];
|
||||
this.num_times_rewatched = source["num_times_rewatched"];
|
||||
this.rewatch_value = source["rewatch_value"];
|
||||
this.tags = source["tags"];
|
||||
this.comments = source["comments"];
|
||||
this.updated_at = source["updated_at"];
|
||||
}
|
||||
}
|
||||
export class MediaList {
|
||||
id: number;
|
||||
mediaId: number;
|
||||
@ -425,40 +459,6 @@ export namespace main {
|
||||
this.is_supporter = source["is_supporter"];
|
||||
}
|
||||
}
|
||||
export class MyListStatus {
|
||||
status: status;
|
||||
score: score;
|
||||
num_episodes_watched: numEpisodesWatched;
|
||||
is_rewatching: isRewatching;
|
||||
start_date: startDate;
|
||||
finish_date: finishDate;
|
||||
priority: priority;
|
||||
num_times_rewatched: numTimesRewatched;
|
||||
rewatch_value: rewatchValue;
|
||||
tags: tags;
|
||||
comments: comments;
|
||||
updated_at: updatedAt;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new MyListStatus(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.status = source["status"];
|
||||
this.score = source["score"];
|
||||
this.num_episodes_watched = source["num_episodes_watched"];
|
||||
this.is_rewatching = source["is_rewatching"];
|
||||
this.start_date = source["start_date"];
|
||||
this.finish_date = source["finish_date"];
|
||||
this.priority = source["priority"];
|
||||
this.num_times_rewatched = source["num_times_rewatched"];
|
||||
this.rewatch_value = source["rewatch_value"];
|
||||
this.tags = source["tags"];
|
||||
this.comments = source["comments"];
|
||||
this.updated_at = source["updated_at"];
|
||||
}
|
||||
}
|
||||
export class SimklAnime {
|
||||
last_watched_at: last_watched_at;
|
||||
status: status;
|
||||
|
Reference in New Issue
Block a user