From 2497fdc5351028acd9866cf38f393f9df2c741d6 Mon Sep 17 00:00:00 2001 From: huangjx Date: Fri, 17 Sep 2021 14:41:15 +0800 Subject: [PATCH] cleaning up --- lib/Command/Aria2Command.php | 5 ++++- lib/Controller/MainController.php | 7 ------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/Command/Aria2Command.php b/lib/Command/Aria2Command.php index 3234a5c..1425082 100644 --- a/lib/Command/Aria2Command.php +++ b/lib/Command/Aria2Command.php @@ -2,8 +2,8 @@ namespace OCA\NCDownloader\Command; +use OCA\NCDownloader\Search\torrentSearch; use OCA\NCDownloader\Tools\Aria2; -use OCA\NCDownloader\Tools\Youtube; use OCA\NCDownloader\Tools\DBConn; use OC\Core\Command\Base; use Symfony\Component\Console\Input\InputArgument; @@ -52,6 +52,9 @@ class Aria2Command extends base if (!$action = $input->getArgument('action')) { $action = 'start'; } + $search = new torrentSearch(); + $search->setSite('bitSearch'); + $data = $search->go('test'); $gid = $input->getOption('gid'); $path = $input->getOption('path'); $numFile = $input->getOption('number'); diff --git a/lib/Controller/MainController.php b/lib/Controller/MainController.php index b901e30..a5b6318 100644 --- a/lib/Controller/MainController.php +++ b/lib/Controller/MainController.php @@ -13,7 +13,6 @@ use OCP\AppFramework\Http\TemplateResponse; use OCP\IL10N; use OCP\IRequest; use OC_Util; -use \OCP\AppFramework\Http\StrictContentSecurityPolicy; class MainController extends Controller { @@ -58,12 +57,6 @@ class MainController extends Controller $response = new TemplateResponse($this->appName, 'Index', $params); - $csp = new StrictContentSecurityPolicy(); - $csp->allowEvalScript(); - $csp->allowInlineStyle(); - - $response->setContentSecurityPolicy($csp); - return $response; }