From f08b9c480f115183136ddb72e0f089cf8726cae3 Mon Sep 17 00:00:00 2001 From: mrcanelas Date: Thu, 3 Oct 2024 18:51:42 -0300 Subject: [PATCH] Add support for providing metadata to IMDBId #33 #34 --- configure.html | 1159 ++++++++++++++++++++++---------------------- lib/getManifest.js | 3 +- package-lock.json | 4 +- package.json | 2 +- 4 files changed, 589 insertions(+), 579 deletions(-) diff --git a/configure.html b/configure.html index 3fb9a93..a6f4676 100644 --- a/configure.html +++ b/configure.html @@ -1,609 +1,618 @@ - - - - The Movie Database Addon - Stremio Addon - + + + + + + + - .name, - .version { - display: inline-block; - vertical-align: top; - } - - .name { - line-height: 5vh; - margin: 0; - } - - .version { - position: relative; - line-height: 5vh; - opacity: 0.8; - margin-bottom: 2vh; - } - - .contact { - position: absolute; - left: 0; - bottom: 4vh; - width: 100%; - text-align: center; - } - - .contact a { - font-size: 1.4vh; - font-style: italic; - } - - .separator { - margin-bottom: 4vh; - } - - .separator-small { - margin-bottom: 2vh; - } - - .form-element { - margin-bottom: 2vh; - } - - .label-to-top { - margin-bottom: 2vh; - } - - .label-to-right { - margin-left: 1vh !important; - } - - .full-width { - width: 100%; - height: 5vh; - padding: 0.5vh 0.5vh; - margin: auto; - border: 0.5vh solid #8a5aab; - font-size: 2.2vh; - cursor: pointer; - display: block; - box-shadow: 0 0.5vh 1vh rgba(0, 0, 0, 0.2); - transition: box-shadow 0.1s ease-in-out; - color: #8a5aab; - } - - #language-select { - width: 100%; - height: 5vh; - padding: 0.5vh 0.5vh; - margin: auto; - border: 0.5vh solid #8a5aab; - font-size: 2.2vh; - cursor: pointer; - display: block; - box-shadow: 0 0.5vh 1vh rgba(0, 0, 0, 0.2); - transition: box-shadow 0.1s ease-in-out; - color: #8a5aab; - } - - - - - - - - - - -
- -

The Movie Database Addon

-

3.0.15

-

Metadata provided by TMDB.

-
-

This addon has more :

- - -
- -
-

Catalog settings:

- -
- -
- -
-
-
- -
-
- -
-
- -

Select your language:

- -
- -
- -
- - - - + +
+ - - - + } + if (!(data || {}).valid) { + alert("RPDB Key is invalid, please try again"); + rpdbInput.value = ""; + } + }) + .catch((e) => { + console.error(e); + }); + }, + true + ); + } else { + rpdbSettings.innerHTML = ""; + } + }); + + + + \ No newline at end of file diff --git a/lib/getManifest.js b/lib/getManifest.js index b915baf..8a3354c 100644 --- a/lib/getManifest.js +++ b/lib/getManifest.js @@ -31,6 +31,7 @@ function loadTranslations(language) { async function getManifest(config) { const language = config.language || DEFAULT_LANGUAGE; const usePrefix = config.use_tmdb_prefix === "true"; + const provideImdbId = config.provide_imdbId === "true"; const translatedCatalogs = loadTranslations(language); const years = generateArrayOfYears(20); const genres_movie = await getGenreList(language, "movie").then((genres) => genres.map((el) => el.name).sort()); @@ -49,7 +50,7 @@ async function getManifest(config) { description: package.description + descriptionSuffix, resources: ["catalog", "meta"], types: ["movie", "series"], - idPrefixes: ["tmdb:"], + idPrefixes: provideImdbId ? ["tmdb:", "tt"] : ["tmdb:"], behaviorHints: { configurable: true, configurationRequired: false, diff --git a/package-lock.json b/package-lock.json index b2782ee..ef91f61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tmdb-addon", - "version": "3.0.15", + "version": "3.0.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "tmdb-addon", - "version": "3.0.14", + "version": "3.0.16", "license": "Apache-2.0", "dependencies": { "cache-manager": "^3.6.3", diff --git a/package.json b/package.json index 0bbaf01..f6ff1a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tmdb-addon", - "version": "3.0.15", + "version": "3.0.16", "description": "Metadata provided by TMDB", "main": "server.js", "dependencies": {