Added support for Moby Games API
This commit is contained in:
parent
73a8a62332
commit
e75bb5b476
3 changed files with 119 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ import { fragWithHTML } from '../utils/Utils';
|
|||
|
||||
export interface MediaDbPluginSettings {
|
||||
OMDbKey: string;
|
||||
MobyGamesKey: string;
|
||||
sfwFilter: boolean;
|
||||
useCustomYamlStringifier: boolean;
|
||||
templates: boolean;
|
||||
|
|
@ -60,6 +61,7 @@ export interface MediaDbPluginSettings {
|
|||
|
||||
const DEFAULT_SETTINGS: MediaDbPluginSettings = {
|
||||
OMDbKey: '',
|
||||
MobyGamesKey: '',
|
||||
sfwFilter: true,
|
||||
useCustomYamlStringifier: true,
|
||||
templates: true,
|
||||
|
|
@ -160,6 +162,18 @@ export class MediaDbSettingTab extends PluginSettingTab {
|
|||
});
|
||||
});
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Moby Games key')
|
||||
.setDesc('API key for "www.mobygames.com".')
|
||||
.addText(cb => {
|
||||
cb.setPlaceholder('API key')
|
||||
.setValue(this.plugin.settings.MobyGamesKey)
|
||||
.onChange(data => {
|
||||
this.plugin.settings.MobyGamesKey = data;
|
||||
this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('SFW filter')
|
||||
.setDesc('Only shows SFW results for APIs that offer filtering.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue