@@ -19,6 +19,13 @@ export interface MediaDbPluginSettings {
1919 openNoteInNewTab : boolean ;
2020 useDefaultFrontMatter : boolean ;
2121 enableTemplaterIntegration : boolean ;
22+ OMDbAPIMovies : boolean ;
23+ OMDbAPISeries : boolean ;
24+ OMDbAPIGames : boolean ;
25+ MALAPIMovies : boolean ;
26+ MALAPISeries : boolean ;
27+ SteamAPI : boolean ;
28+ MobyGamesAPI : boolean ;
2229
2330 movieTemplate : string ;
2431 seriesTemplate : string ;
@@ -69,6 +76,13 @@ const DEFAULT_SETTINGS: MediaDbPluginSettings = {
6976 openNoteInNewTab : true ,
7077 useDefaultFrontMatter : true ,
7178 enableTemplaterIntegration : false ,
79+ OMDbAPIMovies : true ,
80+ OMDbAPIGames : true ,
81+ OMDbAPISeries : true ,
82+ MALAPISeries : true ,
83+ MALAPIMovies : true ,
84+ SteamAPI : true ,
85+ MobyGamesAPI : true ,
7286
7387 movieTemplate : '' ,
7488 seriesTemplate : '' ,
@@ -260,6 +274,75 @@ export class MediaDbSettingTab extends PluginSettingTab {
260274 } ) ;
261275 } ) ;
262276
277+
278+ containerEl . createEl ( 'h3' , { text : 'APIs Per Media Type' } ) ;
279+ containerEl . createEl ( 'h5' , { text : 'Movies' } ) ;
280+ new Setting ( containerEl )
281+ . setName ( 'OMDb API' )
282+ . setDesc ( 'Use OMDb API for movies.' )
283+ . addToggle ( cb => {
284+ cb . setValue ( this . plugin . settings . OMDbAPIMovies ) . onChange ( data => {
285+ this . plugin . settings . OMDbAPIMovies = data ;
286+ this . plugin . saveSettings ( ) ;
287+ } ) ;
288+ } ) ;
289+ new Setting ( containerEl )
290+ . setName ( 'MAL API' )
291+ . setDesc ( 'Use MAL API for movies.' )
292+ . addToggle ( cb => {
293+ cb . setValue ( this . plugin . settings . MALAPIMovies ) . onChange ( data => {
294+ this . plugin . settings . MALAPIMovies = data ;
295+ this . plugin . saveSettings ( ) ;
296+ } ) ;
297+ } ) ;
298+ containerEl . createEl ( 'h5' , { text : 'Series' } ) ;
299+ new Setting ( containerEl )
300+ . setName ( 'OMDb API' )
301+ . setDesc ( 'Use OMDb API for series.' )
302+ . addToggle ( cb => {
303+ cb . setValue ( this . plugin . settings . OMDbAPISeries ) . onChange ( data => {
304+ this . plugin . settings . OMDbAPISeries = data ;
305+ this . plugin . saveSettings ( ) ;
306+ } ) ;
307+ } ) ;
308+ new Setting ( containerEl )
309+ . setName ( 'MAL API' )
310+ . setDesc ( 'Use MAL API for series.' )
311+ . addToggle ( cb => {
312+ cb . setValue ( this . plugin . settings . MALAPISeries ) . onChange ( data => {
313+ this . plugin . settings . MALAPISeries = data ;
314+ this . plugin . saveSettings ( ) ;
315+ } ) ;
316+ } ) ;
317+ containerEl . createEl ( 'h5' , { text : 'Games' } ) ;
318+ new Setting ( containerEl )
319+ . setName ( 'OMDb API' )
320+ . setDesc ( 'Use OMDb API for games.' )
321+ . addToggle ( cb => {
322+ cb . setValue ( this . plugin . settings . OMDbAPIGames ) . onChange ( data => {
323+ this . plugin . settings . OMDbAPIGames = data ;
324+ this . plugin . saveSettings ( ) ;
325+ } ) ;
326+ } ) ;
327+ new Setting ( containerEl )
328+ . setName ( 'Steam API' )
329+ . setDesc ( 'Use OMDb API for games.' )
330+ . addToggle ( cb => {
331+ cb . setValue ( this . plugin . settings . SteamAPI ) . onChange ( data => {
332+ this . plugin . settings . SteamAPI = data ;
333+ this . plugin . saveSettings ( ) ;
334+ } ) ;
335+ } ) ;
336+ new Setting ( containerEl )
337+ . setName ( 'MobyGames API' )
338+ . setDesc ( 'Use MobyGames API for games.' )
339+ . addToggle ( cb => {
340+ cb . setValue ( this . plugin . settings . MobyGamesAPI ) . onChange ( data => {
341+ this . plugin . settings . MobyGamesAPI = data ;
342+ this . plugin . saveSettings ( ) ;
343+ } ) ;
344+ } ) ;
345+
263346 containerEl . createEl ( 'h3' , { text : 'New File Location' } ) ;
264347 // region new file location
265348 new Setting ( containerEl )
0 commit comments