mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-09 15:24:57 +00:00
[NyaaTorrents] Allow searching by username (#2033)
This commit is contained in:
parent
0c8fabeb11
commit
d61871a45e
@ -50,6 +50,11 @@ class NyaaTorrentsBridge extends BridgeAbstract {
|
|||||||
'name' => 'Keyword',
|
'name' => 'Keyword',
|
||||||
'description' => 'Keyword(s)',
|
'description' => 'Keyword(s)',
|
||||||
'type' => 'text'
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'u' => array(
|
||||||
|
'name' => 'User',
|
||||||
|
'description' => 'User',
|
||||||
|
'type' => 'text'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -60,8 +65,13 @@ class NyaaTorrentsBridge extends BridgeAbstract {
|
|||||||
|
|
||||||
public function collectData() {
|
public function collectData() {
|
||||||
|
|
||||||
// Build Search URL from user-provided parameters
|
// Determine base URL, either home page or user page
|
||||||
$search_url = self::URI . '?s=id&o=desc&'
|
$base_uri = self::URI;
|
||||||
|
if (!empty($this->getInput('u')))
|
||||||
|
$base_uri = $base_uri . 'user/' . urlencode($this->getInput('u'));
|
||||||
|
|
||||||
|
// Build Search URL from base URL and search criteria
|
||||||
|
$search_url = $base_uri . '?s=id&o=desc&'
|
||||||
. http_build_query(array(
|
. http_build_query(array(
|
||||||
'f' => $this->getInput('f'),
|
'f' => $this->getInput('f'),
|
||||||
'c' => $this->getInput('c'),
|
'c' => $this->getInput('c'),
|
||||||
|
Loading…
Reference in New Issue
Block a user