Ran prettier and commented out VNDBAPI that I forgot to remove
Just in case I forget: ` bun prettier . --write`
This commit is contained in:
parent
d89d8be189
commit
540a772e6d
5 changed files with 37 additions and 40 deletions
|
|
@ -68,31 +68,30 @@ export class ComicVineAPI extends APIModel {
|
|||
const result = data.results;
|
||||
|
||||
return new ComicMangaModel({
|
||||
type: MediaType.ComicManga,
|
||||
title: result.name,
|
||||
englishTitle: result.name,
|
||||
alternateTitles: result.aliases,
|
||||
plot: result.deck,
|
||||
year: result.start_year ?? '',
|
||||
dataSource: this.apiName,
|
||||
url: result.site_detail_url,
|
||||
id: `4050-${result.id}`,
|
||||
type: MediaType.ComicManga,
|
||||
title: result.name,
|
||||
englishTitle: result.name,
|
||||
alternateTitles: result.aliases,
|
||||
plot: result.deck,
|
||||
year: result.start_year ?? '',
|
||||
dataSource: this.apiName,
|
||||
url: result.site_detail_url,
|
||||
id: `4050-${result.id}`,
|
||||
|
||||
authors: result.people?.map((x: any) => x.name) ?? [],
|
||||
chapters: result.count_of_issues,
|
||||
image: result.image?.original_url ?? '',
|
||||
|
||||
authors: result.people?.map((x: any) => x.name) ?? [],
|
||||
chapters: result.count_of_issues,
|
||||
image: result.image?.original_url ?? '',
|
||||
released: true,
|
||||
publishers: result.publisher?.name ?? [],
|
||||
publishedFrom: result.start_year ?? 'unknown',
|
||||
publishedTo: 'unknown',
|
||||
status: result.status,
|
||||
|
||||
released: true,
|
||||
publishers: result.publisher?.name ?? [],
|
||||
publishedFrom: result.start_year ?? 'unknown',
|
||||
publishedTo: 'unknown',
|
||||
status: result.status,
|
||||
|
||||
userData: {
|
||||
read: false,
|
||||
lastRead: '',
|
||||
personalRating: 0,
|
||||
userData: {
|
||||
read: false,
|
||||
lastRead: '',
|
||||
personalRating: 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { OpenLibraryAPI } from './api/apis/OpenLibraryAPI';
|
|||
import { SteamAPI } from './api/apis/SteamAPI';
|
||||
import { WikipediaAPI } from './api/apis/WikipediaAPI';
|
||||
import { ComicVineAPI } from './api/apis/ComicVineAPI';
|
||||
import { VNDBAPI } from './api/apis/VNDBAPI';
|
||||
//import { VNDBAPI } from './api/apis/VNDBAPI';
|
||||
import { MediaDbFolderImportModal } from './modals/MediaDbFolderImportModal';
|
||||
import type { MediaTypeModel } from './models/MediaTypeModel';
|
||||
import { PropertyMapper } from './settings/PropertyMapper';
|
||||
|
|
@ -58,7 +58,7 @@ export default class MediaDbPlugin extends Plugin {
|
|||
this.apiManager.registerAPI(new ComicVineAPI(this));
|
||||
this.apiManager.registerAPI(new MobyGamesAPI(this));
|
||||
this.apiManager.registerAPI(new GiantBombAPI(this));
|
||||
this.apiManager.registerAPI(new VNDBAPI(this));
|
||||
//this.apiManager.registerAPI(new VNDBAPI(this));
|
||||
// this.apiManager.registerAPI(new LocGovAPI(this)); // TODO: parse data
|
||||
|
||||
this.mediaTypeManager = new MediaTypeManager();
|
||||
|
|
@ -573,7 +573,6 @@ export default class MediaDbPlugin extends Plugin {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
async createEntriesFromFolder(folder: TFolder): Promise<void> {
|
||||
const erroredFiles: { filePath: string; error: string }[] = [];
|
||||
let canceled: boolean = false;
|
||||
|
|
|
|||
|
|
@ -62,12 +62,11 @@ export class PropertyMapper {
|
|||
return obj;
|
||||
}
|
||||
|
||||
|
||||
if (obj.type === "manga") {
|
||||
obj.type = "comicManga";
|
||||
if (obj.type === 'manga') {
|
||||
obj.type = 'comicManga';
|
||||
console.debug(`MDB | updated metadata type`, obj.type);
|
||||
}
|
||||
if (MEDIA_TYPES.contains(obj.type as any)) {
|
||||
if (MEDIA_TYPES.contains(obj.type as any)) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
|||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
new Setting(containerEl)
|
||||
new Setting(containerEl)
|
||||
.setName('Comic Vine Key')
|
||||
.setDesc('API key for "www.comicvine.gamespot.com".')
|
||||
.addText(cb => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue