[addon] adds filtering based on provider

This commit is contained in:
TheBeastLT
2020-03-15 23:46:06 +01:00
parent 6c56d76f98
commit 70c279d7d7
11 changed files with 102 additions and 45 deletions

View File

@@ -174,8 +174,6 @@ button:active {
const { Providers } = require('./manifest');
function landingTemplate(manifest, providers = [], realDebridApiKey = '') {
console.log(providers);
console.log(realDebridApiKey);
const background = manifest.background || 'https://dl.strem.io/addon-background.jpg';
const logo = manifest.logo || 'https://dl.strem.io/addon-logo.png';
const contactHTML = manifest.contactEmail ?
@@ -254,7 +252,7 @@ function landingTemplate(manifest, providers = [], realDebridApiKey = '') {
const providersValue = $('#iProviders').val().join(',');
const realDebridValue = $('#iRealDebrid').val();
const providers = providersValue && providersValue.length ? 'providers=' + providersValue : '';
const realDebrid = realDebridValue && realDebridValue.length ? 'realrebrid='+realDebridValue : '';
const realDebrid = realDebridValue && realDebridValue.length ? 'realdebrid=' + realDebridValue : '';
const configurationValue = [providers, realDebrid].filter(value => value.length).join('|');
const configuration = configurationValue && configurationValue.length ? '/' + configurationValue : '';
installLink.href = 'stremio://' + window.location.host + configuration + '/manifest.json';