mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
add language to provider definition
This commit is contained in:
@@ -48,7 +48,9 @@ function parseConfiguration(configuration) {
|
|||||||
|
|
||||||
function liteConfig() {
|
function liteConfig() {
|
||||||
const config = {};
|
const config = {};
|
||||||
config[Providers.key] = Providers.options.filter(provider => !provider.foreign).map(provider => provider.key);
|
config[Providers.key] = Providers.options
|
||||||
|
.filter(provider => !provider.foreign)
|
||||||
|
.map(provider => provider.key);
|
||||||
config[QualityFilter.key] = ['scr', 'cam']
|
config[QualityFilter.key] = ['scr', 'cam']
|
||||||
config['limit'] = 1;
|
config['limit'] = 1;
|
||||||
return config;
|
return config;
|
||||||
@@ -56,7 +58,9 @@ function liteConfig() {
|
|||||||
|
|
||||||
function brazucaConfig() {
|
function brazucaConfig() {
|
||||||
const config = {};
|
const config = {};
|
||||||
config[Providers.key] = Providers.options.map(provider => provider.key).filter(key => key !== 'rutor');
|
config[Providers.key] = Providers.options
|
||||||
|
.filter(provider => !provider.foreign || provider.foreign === '🇵🇹')
|
||||||
|
.map(provider => provider.key);
|
||||||
config[LanguageOptions.key] = 'portuguese';
|
config[LanguageOptions.key] = 'portuguese';
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const Providers = {
|
|||||||
{
|
{
|
||||||
key: 'rutor',
|
key: 'rutor',
|
||||||
label: 'Rutor',
|
label: 'Rutor',
|
||||||
foreign: true
|
foreign: '🇷🇺'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'horriblesubs',
|
key: 'horriblesubs',
|
||||||
@@ -52,27 +52,27 @@ const Providers = {
|
|||||||
{
|
{
|
||||||
key: 'comando',
|
key: 'comando',
|
||||||
label: 'Comando',
|
label: 'Comando',
|
||||||
foreign: true
|
foreign: '🇵🇹'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'comoeubaixo',
|
key: 'comoeubaixo',
|
||||||
label: 'ComoEuBaixo',
|
label: 'ComoEuBaixo',
|
||||||
foreign: true
|
foreign: '🇵🇹'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'lapumia',
|
key: 'lapumia',
|
||||||
label: 'Lapumia',
|
label: 'Lapumia',
|
||||||
foreign: true
|
foreign: '🇵🇹'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'ondebaixa',
|
key: 'ondebaixa',
|
||||||
label: 'OndeBaixa',
|
label: 'OndeBaixa',
|
||||||
foreign: true
|
foreign: '🇵🇹'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'torrent9',
|
key: 'torrent9',
|
||||||
label: 'Torrent9',
|
label: 'Torrent9',
|
||||||
foreign: true
|
foreign: '🇫🇷'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ function landingTemplate(manifest, config = {}) {
|
|||||||
<a href="mailto:${manifest.contactEmail}">${manifest.contactEmail}</a>
|
<a href="mailto:${manifest.contactEmail}">${manifest.contactEmail}</a>
|
||||||
</div>` : '';
|
</div>` : '';
|
||||||
const providersHTML = Providers.options
|
const providersHTML = Providers.options
|
||||||
.map(provider => `<option value="${provider.key}">${provider.label}</option>`)
|
.map(provider => `<option value="${provider.key}">${provider.foreign || ''}${provider.label}</option>`)
|
||||||
.join('\n');
|
.join('\n');
|
||||||
const sortOptionsHTML = Object.values(SortOptions.options)
|
const sortOptionsHTML = Object.values(SortOptions.options)
|
||||||
.map((option, i) => `<option value="${option.key}" ${i === 0 ? 'selected' : ''}>${option.description}</option>`)
|
.map((option, i) => `<option value="${option.key}" ${i === 0 ? 'selected' : ''}>${option.description}</option>`)
|
||||||
|
|||||||
Reference in New Issue
Block a user