mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 15:19:55 +03:00
[FlickrBridge] Add content option to By username (#1861)
This commit is contained in:
parent
ec7d2a4afb
commit
a485beadd7
1 changed files with 22 additions and 2 deletions
|
@ -51,6 +51,15 @@ class FlickrBridge extends BridgeAbstract {
|
|||
'title' => 'Insert username (as shown in the address bar)',
|
||||
'exampleValue' => 'flickr'
|
||||
),
|
||||
'content' => array(
|
||||
'name' => 'Content',
|
||||
'type' => 'list',
|
||||
'values' => array(
|
||||
'Uploads' => 'uploads',
|
||||
'Favorites' => 'faves',
|
||||
),
|
||||
'defaultValue' => 'uploads',
|
||||
),
|
||||
'media' => array(
|
||||
'name' => 'Media',
|
||||
'type' => 'list',
|
||||
|
@ -156,8 +165,14 @@ class FlickrBridge extends BridgeAbstract {
|
|||
. '&sort=' . $this->getInput('sort') . '&media=' . $this->getInput('media');
|
||||
break;
|
||||
case 'By username':
|
||||
return self::URI . 'search/?user_id=' . urlencode($this->getInput('u'))
|
||||
. '&sort=' . $this->getInput('sort') . '&media=' . $this->getInput('media');
|
||||
$uri = self::URI . 'search/?user_id=' . urlencode($this->getInput('u'))
|
||||
. '&sort=date-posted-desc&media=' . $this->getInput('media');
|
||||
|
||||
if ($this->getInput('content') === 'faves') {
|
||||
return $uri . '&faves=1';
|
||||
}
|
||||
|
||||
return $uri;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -175,6 +190,11 @@ class FlickrBridge extends BridgeAbstract {
|
|||
return $this->getInput('q') . ' - keyword - ' . self::NAME;
|
||||
break;
|
||||
case 'By username':
|
||||
|
||||
if ($this->getInput('content') === 'faves') {
|
||||
return $this->username . ' - favorites - ' . self::NAME;
|
||||
}
|
||||
|
||||
return $this->username . ' - ' . self::NAME;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue