Modified settings.ts to support comics
This commit is contained in:
parent
3befc82b87
commit
c80af49f9d
1 changed files with 67 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ export interface MediaDbPluginSettings {
|
|||
OMDbKey: string;
|
||||
MobyGamesKey: string;
|
||||
GiantBombKey: string;
|
||||
ComicVineKey: string;
|
||||
sfwFilter: boolean;
|
||||
templates: boolean;
|
||||
customDateFormat: string;
|
||||
|
|
@ -46,6 +47,7 @@ export interface MediaDbPluginSettings {
|
|||
musicReleaseTemplate: string;
|
||||
boardgameTemplate: string;
|
||||
bookTemplate: string;
|
||||
comicbookTemplate: string;
|
||||
|
||||
movieFileNameTemplate: string;
|
||||
seriesFileNameTemplate: string;
|
||||
|
|
@ -55,6 +57,7 @@ export interface MediaDbPluginSettings {
|
|||
musicReleaseFileNameTemplate: string;
|
||||
boardgameFileNameTemplate: string;
|
||||
bookFileNameTemplate: string;
|
||||
comicbookFileNameTemplate: string;
|
||||
|
||||
moviePropertyConversionRules: string;
|
||||
seriesPropertyConversionRules: string;
|
||||
|
|
@ -64,6 +67,7 @@ export interface MediaDbPluginSettings {
|
|||
musicReleasePropertyConversionRules: string;
|
||||
boardgamePropertyConversionRules: string;
|
||||
bookPropertyConversionRules: string;
|
||||
comicbookPropertyConversionRules: string;
|
||||
|
||||
movieFolder: string;
|
||||
seriesFolder: string;
|
||||
|
|
@ -73,6 +77,7 @@ export interface MediaDbPluginSettings {
|
|||
musicReleaseFolder: string;
|
||||
boardgameFolder: string;
|
||||
bookFolder: string;
|
||||
comicbookFolder: string;
|
||||
|
||||
propertyMappingModels: PropertyMappingModel[];
|
||||
}
|
||||
|
|
@ -81,6 +86,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
|
|||
OMDbKey: '',
|
||||
MobyGamesKey: '',
|
||||
GiantBombKey: '',
|
||||
ComicVineKey: '',
|
||||
sfwFilter: true,
|
||||
templates: true,
|
||||
customDateFormat: 'L',
|
||||
|
|
@ -112,6 +118,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
|
|||
musicReleaseTemplate: '',
|
||||
boardgameTemplate: '',
|
||||
bookTemplate: '',
|
||||
comicbookTemplate: '',
|
||||
|
||||
movieFileNameTemplate: '{{ title }} ({{ year }})',
|
||||
seriesFileNameTemplate: '{{ title }} ({{ year }})',
|
||||
|
|
@ -121,6 +128,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
|
|||
musicReleaseFileNameTemplate: '{{ title }} (by {{ ENUM:artists }} - {{ year }})',
|
||||
boardgameFileNameTemplate: '{{ title }} ({{ year }})',
|
||||
bookFileNameTemplate: '{{ title }} ({{ year }})',
|
||||
comicbookFileNameTemplate: '{{ title }} ({{ year }})',
|
||||
|
||||
moviePropertyConversionRules: '',
|
||||
seriesPropertyConversionRules: '',
|
||||
|
|
@ -130,6 +138,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
|
|||
musicReleasePropertyConversionRules: '',
|
||||
boardgamePropertyConversionRules: '',
|
||||
bookPropertyConversionRules: '',
|
||||
comicbookPropertyConversionRules: '',
|
||||
|
||||
movieFolder: 'Media DB/movies',
|
||||
seriesFolder: 'Media DB/series',
|
||||
|
|
@ -139,6 +148,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
|
|||
musicReleaseFolder: 'Media DB/music',
|
||||
boardgameFolder: 'Media DB/boardgames',
|
||||
bookFolder: 'Media DB/books',
|
||||
comicbookFolder: 'Media DB/comicbooks',
|
||||
|
||||
propertyMappingModels: [],
|
||||
};
|
||||
|
|
@ -217,6 +227,17 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
|||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
new Setting(containerEl)
|
||||
.setName('Comic Vine Key')
|
||||
.setDesc('API key for "www.comicvine.gamespot.com".')
|
||||
.addText(cb => {
|
||||
cb.setPlaceholder('API key')
|
||||
.setValue(this.plugin.settings.ComicVineKey)
|
||||
.onChange(data => {
|
||||
this.plugin.settings.ComicVineKey = data;
|
||||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('SFW filter')
|
||||
|
|
@ -364,7 +385,15 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
|||
// void this.plugin.saveSettings();
|
||||
// });
|
||||
// });
|
||||
|
||||
// new Setting(containerEl)
|
||||
// .setName('Giantbomb API')
|
||||
// .setDesc('Use Giantbomb API for games.')
|
||||
// .addToggle(cb => {
|
||||
// cb.setValue(this.plugin.settings.apiToggle.GiantBombAPI.game).onChange(data => {
|
||||
// this.plugin.settings.apiToggle.GiantBombAPI.game = data;
|
||||
// void this.plugin.saveSettings();
|
||||
// });
|
||||
// });
|
||||
new Setting(containerEl).setName('New file location').setHeading();
|
||||
// region new file location
|
||||
new Setting(containerEl)
|
||||
|
|
@ -469,6 +498,18 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
|||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
new Setting(containerEl)
|
||||
.setName('Comic Book folder')
|
||||
.setDesc('Where newly imported comic books should be placed.')
|
||||
.addSearch(cb => {
|
||||
new FolderSuggest(this.app, cb.inputEl);
|
||||
cb.setPlaceholder(DEFAULT_SETTINGS.comicbookFolder)
|
||||
.setValue(this.plugin.settings.comicbookFolder)
|
||||
.onChange(data => {
|
||||
this.plugin.settings.comicbookFolder = data;
|
||||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
// endregion
|
||||
|
||||
new Setting(containerEl).setName('Template settings').setHeading();
|
||||
|
|
@ -576,6 +617,19 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
|||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Comic Book template')
|
||||
.setDesc('Template file to be used when creating a new note for a comic book.')
|
||||
.addSearch(cb => {
|
||||
new FileSuggest(this.app, cb.inputEl);
|
||||
cb.setPlaceholder('Example: comicbookTemplate.md')
|
||||
.setValue(this.plugin.settings.comicbookTemplate)
|
||||
.onChange(data => {
|
||||
this.plugin.settings.comicbookTemplate = data;
|
||||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
// endregion
|
||||
|
||||
new Setting(containerEl).setName('File name settings').setHeading();
|
||||
|
|
@ -675,6 +729,18 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
|||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Comic Book file name template')
|
||||
.setDesc('Template for the file name used when creating a new note for a book.')
|
||||
.addText(cb => {
|
||||
cb.setPlaceholder(`Example: ${DEFAULT_SETTINGS.comicbookFileNameTemplate}`)
|
||||
.setValue(this.plugin.settings.comicbookFileNameTemplate)
|
||||
.onChange(data => {
|
||||
this.plugin.settings.comicbookFileNameTemplate = data;
|
||||
void this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
// endregion
|
||||
|
||||
// region Property Mappings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue