diff --git a/main.ts b/main.ts index b8a7110..3fef98a 100644 --- a/main.ts +++ b/main.ts @@ -138,6 +138,7 @@ export default class Moviegrabber extends Plugin { url.searchParams.append('apikey', this.settings.OMDb_API_Key); url.searchParams.append('i', movie.imdbID); + url.searchParams.append('plot', this.settings.PlotLength); // fetch data var response; @@ -502,6 +503,18 @@ class MoviegrabberSettingTab extends PluginSettingTab { this.plugin.settings.YouTube_API_Key = value; await this.plugin.saveSettings(); })); + + new Setting(containerEl) + .setName('Plot length') + .setDesc('choose the plot length option for Omdb.') + .addDropdown(dropDown => dropDown + .addOption('short', 'short') + .addOption('full', 'full') + .setValue(this.plugin.settings.PlotLength) + .onChange(async (value) => { + this.plugin.settings.PlotLength = value; + await this.plugin.saveSettings(); + })) new Setting(containerEl) .setName('Switch to generated notes') diff --git a/manifest.json b/manifest.json index b700735..1d68a71 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "moviegrabber", "name": "Moviegrabber", - "version": "1.1.10", + "version": "1.1.11", "minAppVersion": "0.15.0", "description": "Grab movie data from public APIs and transform it into notes that can be used with dataview and properties", "author": "Superschnizel", diff --git a/src/MoviegrabberSettings.ts b/src/MoviegrabberSettings.ts index cac3e69..bb3dfbe 100644 --- a/src/MoviegrabberSettings.ts +++ b/src/MoviegrabberSettings.ts @@ -7,6 +7,8 @@ export interface MoviegrabberSettings { MovieTemplatePath: string; SeriesTemplatePath: string; + + PlotLength: string; } export const DEFAULT_SETTINGS: MoviegrabberSettings = { @@ -16,7 +18,8 @@ export const DEFAULT_SETTINGS: MoviegrabberSettings = { YouTube_API_Key: '', SwitchToCreatedNote: true, MovieTemplatePath: '', - SeriesTemplatePath: '' + SeriesTemplatePath: '', + PlotLength: 'short' } export const DEFAULT_TEMPLATE: string = "---\n"+