added options for tracking youtube-dl downloads;bugs fixing

This commit is contained in:
huangjx
2021-09-14 22:58:36 +08:00
parent ced82caf0a
commit 2e834d4f9c
23 changed files with 649 additions and 182 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace OCA\NCDownloader\Controller;
use OCA\NCDownloader\Search\torrentSearch;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
class SearchController extends Controller
{
private $userId;
private $settings = null;
//@config OC\AppConfig
private $l10n;
public function __construct($appName, IRequest $request, $UserId)
{
parent::__construct($appName, $request);
$this->appName = $appName;
$this->uid = $UserId;
$this->urlGenerator = \OC::$server->getURLGenerator();
}
public function execute()
{
$keyword = trim($this->request->getParam('form_input_text'));
$data = torrentSearch::go($keyword);
$resp['title'] = ['title', 'seeders', 'info', 'actions'];
$resp['row'] = $data;
return new JSONResponse($resp);
}
}