1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 22:00:23 +02:00

[UnogsBridge] Better feed title for Country context (#2279)

This commit is contained in:
csisoap
2021-09-28 16:20:04 +07:00
committed by GitHub
parent 42e40e2823
commit cb111a3ebd

View File

@@ -74,7 +74,7 @@ class UnogsBridge extends BridgeAbstract {
if($this->queriedContext == 'Global') {
$feedName .= 'Netflix Global - ';
} elseif($this->queriedContext == 'Country') {
$feedName .= 'Netflix Country Code: ' . $this->getInput('country_code') . ' - ';
$feedName .= 'Netflix ' . $this->getParametersKey('country_code') . ' - ';
}
if($this->getInput('feed') == 'expiring') {
$feedName .= 'Expiring title';
@@ -86,6 +86,20 @@ class UnogsBridge extends BridgeAbstract {
return $feedName;
}
private function getParametersKey($input = '') {
$params = $this->getParameters();
$tab = 'Country';
if (!isset($params[$tab][$input])) {
return '';
}
return array_search(
$this->getInput($input),
$params[$tab][$input]['values']
);
}
private function getJSON($url) {
$header = array(
'Referer: https://unogs.com/',