mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-01 14:24:39 +03:00
[Arte7Bridge] Support all languages (#2543)
This commit is contained in:
parent
06ef3946cd
commit
aa0aa727ad
1 changed files with 46 additions and 53 deletions
|
@ -18,52 +18,52 @@ class Arte7Bridge extends BridgeAbstract {
|
||||||
'defaultValue' => false,
|
'defaultValue' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'Catégorie (Français)' => array(
|
'Category' => array(
|
||||||
'catfr' => array(
|
'lang' => array(
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'name' => 'Catégorie',
|
'name' => 'Language',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'Toutes les vidéos (français)' => null,
|
'Français' => 'fr',
|
||||||
'Actu & société' => 'ACT',
|
'Deutsch' => 'de',
|
||||||
'Séries & fiction' => 'SER',
|
'English' => 'en',
|
||||||
'Cinéma' => 'CIN',
|
'Español' => 'es',
|
||||||
'Arts & spectacles classiques' => 'ARS',
|
'Polski' => 'pl',
|
||||||
'Culture pop' => 'CPO',
|
'Italiano' => 'it'
|
||||||
'Découverte' => 'DEC',
|
),
|
||||||
'Histoire' => 'HIST',
|
|
||||||
'Science' => 'SCI',
|
|
||||||
'Autre' => 'AUT'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'Collection (Français)' => array(
|
|
||||||
'colfr' => array(
|
|
||||||
'name' => 'Collection id',
|
|
||||||
'required' => true,
|
|
||||||
'title' => 'ex. RC-014095 pour https://www.arte.tv/fr/videos/RC-014095/blow-up/',
|
'title' => 'ex. RC-014095 pour https://www.arte.tv/fr/videos/RC-014095/blow-up/',
|
||||||
'exampleValue' => 'RC-014095'
|
'exampleValue' => 'RC-014095'
|
||||||
)
|
),
|
||||||
),
|
'cat' => array(
|
||||||
'Catégorie (Allemand)' => array(
|
|
||||||
'catde' => array(
|
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'name' => 'Catégorie',
|
'name' => 'Category',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'Alle Videos (deutsch)' => null,
|
'All videos' => null,
|
||||||
'Aktuelles & Gesellschaft' => 'ACT',
|
'News & society' => 'ACT',
|
||||||
'Fernsehfilme & Serien' => 'SER',
|
'Series & fiction' => 'SER',
|
||||||
'Kino' => 'CIN',
|
'Cinema' => 'CIN',
|
||||||
'Kunst & Kultur' => 'ARS',
|
'Culture' => 'ARS',
|
||||||
'Popkultur & Alternativ' => 'CPO',
|
'Culture pop' => 'CPO',
|
||||||
'Entdeckung' => 'DEC',
|
'Discovery' => 'DEC',
|
||||||
'Geschichte' => 'HIST',
|
'History' => 'HIST',
|
||||||
'Wissenschaft' => 'SCI',
|
'Science' => 'SCI',
|
||||||
'Sonstiges' => 'AUT'
|
'Other' => 'AUT'
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
'Collection (Allemand)' => array(
|
'Collection' => array(
|
||||||
'colde' => array(
|
'lang' => array(
|
||||||
|
'type' => 'list',
|
||||||
|
'name' => 'Language',
|
||||||
|
'values' => array(
|
||||||
|
'Français' => 'fr',
|
||||||
|
'Deutsch' => 'de',
|
||||||
|
'English' => 'en',
|
||||||
|
'Español' => 'es',
|
||||||
|
'Polski' => 'pl',
|
||||||
|
'Italiano' => 'it'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'col' => array(
|
||||||
'name' => 'Collection id',
|
'name' => 'Collection id',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'title' => 'ex. RC-014095 pour https://www.arte.tv/de/videos/RC-014095/blow-up/',
|
'title' => 'ex. RC-014095 pour https://www.arte.tv/de/videos/RC-014095/blow-up/',
|
||||||
|
@ -73,26 +73,19 @@ class Arte7Bridge extends BridgeAbstract {
|
||||||
);
|
);
|
||||||
|
|
||||||
public function collectData(){
|
public function collectData(){
|
||||||
|
$lang = $this->getInput('lang');
|
||||||
switch($this->queriedContext) {
|
switch($this->queriedContext) {
|
||||||
case 'Catégorie (Français)':
|
case 'Category':
|
||||||
$category = $this->getInput('catfr');
|
$category = $this->getInput('cat');
|
||||||
$lang = 'fr';
|
$collectionId = null;
|
||||||
break;
|
break;
|
||||||
case 'Collection (Français)':
|
case 'Collection':
|
||||||
$lang = 'fr';
|
$collectionId = $this->getInput('col');
|
||||||
$collectionId = $this->getInput('colfr');
|
$category = null;
|
||||||
break;
|
|
||||||
case 'Catégorie (Allemand)':
|
|
||||||
$category = $this->getInput('catde');
|
|
||||||
$lang = 'de';
|
|
||||||
break;
|
|
||||||
case 'Collection (Allemand)':
|
|
||||||
$lang = 'de';
|
|
||||||
$collectionId = $this->getInput('colde');
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = 'https://api.arte.tv/api/opa/v3/videos?sort=-lastModified&limit=10&language='
|
$url = 'https://api.arte.tv/api/opa/v3/videos?sort=-lastModified&limit=15&language='
|
||||||
. $lang
|
. $lang
|
||||||
. ($category != null ? '&category.code=' . $category : '')
|
. ($category != null ? '&category.code=' . $category : '')
|
||||||
. ($collectionId != null ? '&collections.collectionId=' . $collectionId : '');
|
. ($collectionId != null ? '&collections.collectionId=' . $collectionId : '');
|
||||||
|
|
Loading…
Add table
Reference in a new issue