mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[NyaaTorrents] Allow searching by username (#2033)
This commit is contained in:
parent
0c8fabeb11
commit
d61871a45e
1 changed files with 12 additions and 2 deletions
|
@ -50,6 +50,11 @@ class NyaaTorrentsBridge extends BridgeAbstract {
|
|||
'name' => 'Keyword',
|
||||
'description' => 'Keyword(s)',
|
||||
'type' => 'text'
|
||||
),
|
||||
'u' => array(
|
||||
'name' => 'User',
|
||||
'description' => 'User',
|
||||
'type' => 'text'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -60,8 +65,13 @@ class NyaaTorrentsBridge extends BridgeAbstract {
|
|||
|
||||
public function collectData() {
|
||||
|
||||
// Build Search URL from user-provided parameters
|
||||
$search_url = self::URI . '?s=id&o=desc&'
|
||||
// Determine base URL, either home page or user page
|
||||
$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(
|
||||
'f' => $this->getInput('f'),
|
||||
'c' => $this->getInput('c'),
|
||||
|
|
Loading…
Add table
Reference in a new issue