Fixed Simkl Bugs

This commit is contained in:
2024-08-18 17:23:09 -04:00
parent 6ebf5ac48e
commit 4d9012b43c
13 changed files with 280 additions and 157 deletions

View File

@ -42,8 +42,10 @@ export function SimklGetUserWatchlist():Promise<main.SimklWatchList>;
export function SimklLogin():Promise<void>;
export function SimklSyncEpisodes(arg1:main.Anime,arg2:number):Promise<any>;
export function SimklSearch(arg1:number):Promise<main.SimklAnime>;
export function SimklSyncRating(arg1:main.Anime,arg2:number):Promise<any>;
export function SimklSyncEpisodes(arg1:main.SimklAnime,arg2:number):Promise<any>;
export function SimklSyncStatus(arg1:main.Anime,arg2:string):Promise<any>;
export function SimklSyncRating(arg1:main.SimklAnime,arg2:number):Promise<any>;
export function SimklSyncStatus(arg1:main.SimklAnime,arg2:string):Promise<any>;

View File

@ -82,6 +82,10 @@ export function SimklLogin() {
return window['go']['main']['App']['SimklLogin']();
}
export function SimklSearch(arg1) {
return window['go']['main']['App']['SimklSearch'](arg1);
}
export function SimklSyncEpisodes(arg1, arg2) {
return window['go']['main']['App']['SimklSyncEpisodes'](arg1, arg2);
}

View File

@ -167,36 +167,6 @@ export namespace main {
return a;
}
}
export class Anime {
last_watched_at: last_watched_at;
status: status;
user_rating: user_rating;
last_watched: last_watched;
next_to_watch: next_to_watch;
watched_episodes_count: watched_episodes_count;
total_episodes_count: total_episodes_count;
not_aired_episodes_count: not_aired_episodes_count;
show: show;
anime_type: anime_type;
static createFrom(source: any = {}) {
return new Anime(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.last_watched_at = source["last_watched_at"];
this.status = source["status"];
this.user_rating = source["user_rating"];
this.last_watched = source["last_watched"];
this.next_to_watch = source["next_to_watch"];
this.watched_episodes_count = source["watched_episodes_count"];
this.total_episodes_count = source["total_episodes_count"];
this.not_aired_episodes_count = source["not_aired_episodes_count"];
this.show = source["show"];
this.anime_type = source["anime_type"];
}
}
export class MALAnime {
id: id;
@ -489,6 +459,36 @@ export namespace main {
this.updated_at = source["updated_at"];
}
}
export class SimklAnime {
last_watched_at: last_watched_at;
status: status;
user_rating: user_rating;
last_watched: last_watched;
next_to_watch: next_to_watch;
watched_episodes_count: watched_episodes_count;
total_episodes_count: total_episodes_count;
not_aired_episodes_count: not_aired_episodes_count;
show: show;
anime_type: anime_type;
static createFrom(source: any = {}) {
return new SimklAnime(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.last_watched_at = source["last_watched_at"];
this.status = source["status"];
this.user_rating = source["user_rating"];
this.last_watched = source["last_watched"];
this.next_to_watch = source["next_to_watch"];
this.watched_episodes_count = source["watched_episodes_count"];
this.total_episodes_count = source["total_episodes_count"];
this.not_aired_episodes_count = source["not_aired_episodes_count"];
this.show = source["show"];
this.anime_type = source["anime_type"];
}
}
export class SimklUser {
user: user;
account: account;