Update OMDb urls to https
This commit is contained in:
parent
b856c18207
commit
f488018f15
1 changed files with 3 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ export class OMDbAPI extends APIModel {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.apiName = 'OMDbAPI';
|
this.apiName = 'OMDbAPI';
|
||||||
this.apiDescription = 'A free API for Movies, Series and Games.';
|
this.apiDescription = 'A free API for Movies, Series and Games.';
|
||||||
this.apiUrl = 'http://www.omdbapi.com/';
|
this.apiUrl = 'https://www.omdbapi.com/';
|
||||||
this.types = [MediaType.Movie, MediaType.Series, MediaType.Game];
|
this.types = [MediaType.Movie, MediaType.Series, MediaType.Game];
|
||||||
this.typeMappings = new Map<string, string>();
|
this.typeMappings = new Map<string, string>();
|
||||||
this.typeMappings.set('movie', 'movie');
|
this.typeMappings.set('movie', 'movie');
|
||||||
|
|
@ -32,7 +32,7 @@ export class OMDbAPI extends APIModel {
|
||||||
throw Error(`MDB | OMDb ${this.apiName} API key missing.`);
|
throw Error(`MDB | OMDb ${this.apiName} API key missing.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchUrl = `http://www.omdbapi.com/?s=${encodeURIComponent(title)}&apikey=${this.plugin.settings.OMDbKey}`;
|
const searchUrl = `https://www.omdbapi.com/?s=${encodeURIComponent(title)}&apikey=${this.plugin.settings.OMDbKey}`;
|
||||||
const fetchData = await fetch(searchUrl);
|
const fetchData = await fetch(searchUrl);
|
||||||
|
|
||||||
if (fetchData.status === 401) {
|
if (fetchData.status === 401) {
|
||||||
|
|
@ -110,7 +110,7 @@ export class OMDbAPI extends APIModel {
|
||||||
throw Error(`MDB | OMDb ${this.apiName} API key missing.`);
|
throw Error(`MDB | OMDb ${this.apiName} API key missing.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchUrl = `http://www.omdbapi.com/?i=${encodeURIComponent(id)}&apikey=${this.plugin.settings.OMDbKey}`;
|
const searchUrl = `https://www.omdbapi.com/?i=${encodeURIComponent(id)}&apikey=${this.plugin.settings.OMDbKey}`;
|
||||||
const fetchData = await fetch(searchUrl);
|
const fetchData = await fetch(searchUrl);
|
||||||
|
|
||||||
if (fetchData.status === 401) {
|
if (fetchData.status === 401) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue