mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[addon] adds custom landing page for addon configuration
This commit is contained in:
33
addon/lib/manifest.js
Normal file
33
addon/lib/manifest.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const Providers = [
|
||||
'ThePirateBay',
|
||||
'RARBG',
|
||||
'1337x',
|
||||
'KickassTorrents',
|
||||
'HorribleSubs'
|
||||
];
|
||||
|
||||
function manifest(providers, realDebridApiKey) {
|
||||
const providersList = Array.isArray(providers) && providers.map(provider => getProvider(provider)) || Providers;
|
||||
const providersDesc = providers && providers.length ? 'Enabled providers -' : 'Currently supports';
|
||||
const realDebridDesc = realDebridApiKey ? ' and RealdDebrid enabled' : '';
|
||||
return {
|
||||
id: 'com.stremio.torrentio.addon',
|
||||
version: '0.0.1-beta',
|
||||
name: 'Torrentio',
|
||||
description: '[BETA] Provides torrent streams from scraped torrent providers.'
|
||||
+ ` ${providersDesc} ${providersList.join(', ')}${realDebridDesc}.`
|
||||
+ ' To configure visit www.torrentio.now.sh',
|
||||
catalogs: [],
|
||||
resources: ['stream'],
|
||||
types: ['movie', 'series'],
|
||||
idPrefixes: ['tt', 'kitsu'],
|
||||
background: `https://i.ibb.co/VtSfFP9/t8wVwcg.jpg`,
|
||||
logo: `https://i.ibb.co/w4BnkC9/GwxAcDV.png`,
|
||||
}
|
||||
}
|
||||
|
||||
function getProvider(configProvider) {
|
||||
return Providers.find(provider => provider.toLowerCase() === configProvider);
|
||||
}
|
||||
|
||||
module.exports = { manifest, Providers };
|
||||
Reference in New Issue
Block a user