Removed logging and fixed error for comicmanga
This commit is contained in:
parent
daeefb9688
commit
e09737a090
1 changed files with 2 additions and 8 deletions
|
|
@ -294,8 +294,8 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
const apiMediaTypes = {
|
const apiMediaTypes = {
|
||||||
OMDbAPI: ['movie', 'series', 'game'],
|
OMDbAPI: ['movie', 'series', 'game'],
|
||||||
MALAPI: ['movie', 'series'],
|
MALAPI: ['movie', 'series'],
|
||||||
MALAPIManga: ['manga'],
|
MALAPIManga: ['comicManga'],
|
||||||
ComicVineAPI: ['comic', 'manga'],
|
ComicVineAPI: ['comicManga'],
|
||||||
SteamAPI: ['game'],
|
SteamAPI: ['game'],
|
||||||
MobyGamesAPI: ['game'],
|
MobyGamesAPI: ['game'],
|
||||||
GiantBombAPI: ['game'],
|
GiantBombAPI: ['game'],
|
||||||
|
|
@ -311,15 +311,9 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log the populated map to verify its contents
|
|
||||||
console.log('mediaTypeApiMap:', mediaTypeApiMap);
|
|
||||||
|
|
||||||
// Filter out media types with only one API
|
// Filter out media types with only one API
|
||||||
const filteredMediaTypes = Array.from(mediaTypeApiMap.entries()).filter(([_, apis]) => apis.length > 1);
|
const filteredMediaTypes = Array.from(mediaTypeApiMap.entries()).filter(([_, apis]) => apis.length > 1);
|
||||||
|
|
||||||
// Log the filtered media types to verify the filtering
|
|
||||||
console.log('filteredMediaTypes:', filteredMediaTypes);
|
|
||||||
|
|
||||||
// Dynamically create settings based on the filtered media types and their APIs
|
// Dynamically create settings based on the filtered media types and their APIs
|
||||||
for (const [mediaType, apis] of filteredMediaTypes) {
|
for (const [mediaType, apis] of filteredMediaTypes) {
|
||||||
new Setting(containerEl).setName(`Select APIs for ${unCamelCase(mediaType)}`).setHeading();
|
new Setting(containerEl).setName(`Select APIs for ${unCamelCase(mediaType)}`).setHeading();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue