@@ -14,6 +14,7 @@ export interface MediaDbPluginSettings {
1414 OMDbKey : string ;
1515 MobyGamesKey : string ;
1616 GiantBombKey : string ;
17+ ComicVineKey : string ;
1718 sfwFilter : boolean ;
1819 templates : boolean ;
1920 customDateFormat : string ;
@@ -46,6 +47,7 @@ export interface MediaDbPluginSettings {
4647 musicReleaseTemplate : string ;
4748 boardgameTemplate : string ;
4849 bookTemplate : string ;
50+ comicbookTemplate : string ;
4951
5052 movieFileNameTemplate : string ;
5153 seriesFileNameTemplate : string ;
@@ -55,6 +57,7 @@ export interface MediaDbPluginSettings {
5557 musicReleaseFileNameTemplate : string ;
5658 boardgameFileNameTemplate : string ;
5759 bookFileNameTemplate : string ;
60+ comicbookFileNameTemplate : string ;
5861
5962 moviePropertyConversionRules : string ;
6063 seriesPropertyConversionRules : string ;
@@ -64,6 +67,7 @@ export interface MediaDbPluginSettings {
6467 musicReleasePropertyConversionRules : string ;
6568 boardgamePropertyConversionRules : string ;
6669 bookPropertyConversionRules : string ;
70+ comicbookPropertyConversionRules : string ;
6771
6872 movieFolder : string ;
6973 seriesFolder : string ;
@@ -73,6 +77,7 @@ export interface MediaDbPluginSettings {
7377 musicReleaseFolder : string ;
7478 boardgameFolder : string ;
7579 bookFolder : string ;
80+ comicbookFolder : string ;
7681
7782 propertyMappingModels : PropertyMappingModel [ ] ;
7883}
@@ -81,6 +86,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
8186 OMDbKey : '' ,
8287 MobyGamesKey : '' ,
8388 GiantBombKey : '' ,
89+ ComicVineKey : '' ,
8490 sfwFilter : true ,
8591 templates : true ,
8692 customDateFormat : 'L' ,
@@ -112,6 +118,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
112118 musicReleaseTemplate : '' ,
113119 boardgameTemplate : '' ,
114120 bookTemplate : '' ,
121+ comicbookTemplate : '' ,
115122
116123 movieFileNameTemplate : '{{ title }} ({{ year }})' ,
117124 seriesFileNameTemplate : '{{ title }} ({{ year }})' ,
@@ -121,6 +128,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
121128 musicReleaseFileNameTemplate : '{{ title }} (by {{ ENUM:artists }} - {{ year }})' ,
122129 boardgameFileNameTemplate : '{{ title }} ({{ year }})' ,
123130 bookFileNameTemplate : '{{ title }} ({{ year }})' ,
131+ comicbookFileNameTemplate : '{{ title }} ({{ year }})' ,
124132
125133 moviePropertyConversionRules : '' ,
126134 seriesPropertyConversionRules : '' ,
@@ -130,6 +138,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
130138 musicReleasePropertyConversionRules : '' ,
131139 boardgamePropertyConversionRules : '' ,
132140 bookPropertyConversionRules : '' ,
141+ comicbookPropertyConversionRules : '' ,
133142
134143 movieFolder : 'Media DB/movies' ,
135144 seriesFolder : 'Media DB/series' ,
@@ -139,6 +148,7 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
139148 musicReleaseFolder : 'Media DB/music' ,
140149 boardgameFolder : 'Media DB/boardgames' ,
141150 bookFolder : 'Media DB/books' ,
151+ comicbookFolder : 'Media DB/comicbooks' ,
142152
143153 propertyMappingModels : [ ] ,
144154} ;
@@ -217,6 +227,17 @@ export class MediaDbSettingTab extends PluginSettingTab {
217227 void this . plugin . saveSettings ( ) ;
218228 } ) ;
219229 } ) ;
230+ new Setting ( containerEl )
231+ . setName ( 'Comic Vine Key' )
232+ . setDesc ( 'API key for "www.comicvine.gamespot.com".' )
233+ . addText ( cb => {
234+ cb . setPlaceholder ( 'API key' )
235+ . setValue ( this . plugin . settings . ComicVineKey )
236+ . onChange ( data => {
237+ this . plugin . settings . ComicVineKey = data ;
238+ void this . plugin . saveSettings ( ) ;
239+ } ) ;
240+ } ) ;
220241
221242 new Setting ( containerEl )
222243 . setName ( 'SFW filter' )
@@ -364,7 +385,15 @@ export class MediaDbSettingTab extends PluginSettingTab {
364385 // void this.plugin.saveSettings();
365386 // });
366387 // });
367-
388+ // new Setting(containerEl)
389+ // .setName('Giantbomb API')
390+ // .setDesc('Use Giantbomb API for games.')
391+ // .addToggle(cb => {
392+ // cb.setValue(this.plugin.settings.apiToggle.GiantBombAPI.game).onChange(data => {
393+ // this.plugin.settings.apiToggle.GiantBombAPI.game = data;
394+ // void this.plugin.saveSettings();
395+ // });
396+ // });
368397 new Setting ( containerEl ) . setName ( 'New file location' ) . setHeading ( ) ;
369398 // region new file location
370399 new Setting ( containerEl )
@@ -469,6 +498,18 @@ export class MediaDbSettingTab extends PluginSettingTab {
469498 void this . plugin . saveSettings ( ) ;
470499 } ) ;
471500 } ) ;
501+ new Setting ( containerEl )
502+ . setName ( 'Comic Book folder' )
503+ . setDesc ( 'Where newly imported comic books should be placed.' )
504+ . addSearch ( cb => {
505+ new FolderSuggest ( this . app , cb . inputEl ) ;
506+ cb . setPlaceholder ( DEFAULT_SETTINGS . comicbookFolder )
507+ . setValue ( this . plugin . settings . comicbookFolder )
508+ . onChange ( data => {
509+ this . plugin . settings . comicbookFolder = data ;
510+ void this . plugin . saveSettings ( ) ;
511+ } ) ;
512+ } ) ;
472513 // endregion
473514
474515 new Setting ( containerEl ) . setName ( 'Template settings' ) . setHeading ( ) ;
@@ -576,6 +617,19 @@ export class MediaDbSettingTab extends PluginSettingTab {
576617 void this . plugin . saveSettings ( ) ;
577618 } ) ;
578619 } ) ;
620+
621+ new Setting ( containerEl )
622+ . setName ( 'Comic Book template' )
623+ . setDesc ( 'Template file to be used when creating a new note for a comic book.' )
624+ . addSearch ( cb => {
625+ new FileSuggest ( this . app , cb . inputEl ) ;
626+ cb . setPlaceholder ( 'Example: comicbookTemplate.md' )
627+ . setValue ( this . plugin . settings . comicbookTemplate )
628+ . onChange ( data => {
629+ this . plugin . settings . comicbookTemplate = data ;
630+ void this . plugin . saveSettings ( ) ;
631+ } ) ;
632+ } ) ;
579633 // endregion
580634
581635 new Setting ( containerEl ) . setName ( 'File name settings' ) . setHeading ( ) ;
@@ -675,6 +729,18 @@ export class MediaDbSettingTab extends PluginSettingTab {
675729 void this . plugin . saveSettings ( ) ;
676730 } ) ;
677731 } ) ;
732+
733+ new Setting ( containerEl )
734+ . setName ( 'Comic Book file name template' )
735+ . setDesc ( 'Template for the file name used when creating a new note for a book.' )
736+ . addText ( cb => {
737+ cb . setPlaceholder ( `Example: ${ DEFAULT_SETTINGS . comicbookFileNameTemplate } ` )
738+ . setValue ( this . plugin . settings . comicbookFileNameTemplate )
739+ . onChange ( data => {
740+ this . plugin . settings . comicbookFileNameTemplate = data ;
741+ void this . plugin . saveSettings ( ) ;
742+ } ) ;
743+ } ) ;
678744 // endregion
679745
680746 // region Property Mappings
0 commit comments