deleted unused code;bumped version to 0.1.1

This commit is contained in:
huangjx
2021-09-18 11:55:55 +08:00
parent 1d961261cf
commit 3032d4f859
3 changed files with 3 additions and 9 deletions

View File

@@ -50,7 +50,6 @@ class Application extends App
$container->query('UserId'),
\OC::$server->getL10N('ncdownloader'),
//\OC::$server->getRootFolder(),
$container->query("Youtube"),
$container->query('Aria2')
);
});

View File

@@ -5,7 +5,7 @@
<summary>Aria2 and youtube-dl web gui for nextcloud</summary>
<description>built-in torrent search;Start and stop Aria2 process, manage Aria2 from the web;
Download videos from youtube, twitter and other sites;</description>
<version>0.1.0</version>
<version>0.1.1</version>
<licence>agpl</licence>
<author mail="freefallbenson@gmail.com" homepage="https://github.com/shiningw">jiaxinhuang</author>
<namespace>NCDownloader</namespace>

View File

@@ -5,7 +5,6 @@ namespace OCA\NCDownloader\Controller;
use OCA\NCDownloader\Tools\Aria2;
use OCA\NCDownloader\Tools\DBConn;
use OCA\NCDownloader\Tools\Helper;
use OCA\NCDownloader\Tools\Youtube;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\TemplateResponse;
@@ -23,21 +22,17 @@ class MainController extends Controller
private $aria2Opts;
private $l10n;
public function __construct($appName, IRequest $request, $UserId, IL10N $IL10N, Youtube $youtube, Aria2 $aria2)
public function __construct($appName, IRequest $request, $UserId, IL10N $IL10N, Aria2 $aria2)
{
parent::__construct($appName, $request);
$this->appName = $appName;
$this->uid = $UserId;
$this->l10n = $IL10N;
$this->dataDir = \OC::$server->getSystemConfig()->getValue('datadirectory');
//$this->rootFolder = $rootFolder;
OC_Util::setupFS();
$this->urlGenerator = \OC::$server->getURLGenerator();
$this->aria2 = $aria2;
$this->aria2->init();
$this->youtube = $youtube;
$this->dbconn = new DBConn();
$this->tablename = $this->dbconn->queryBuilder->getTableName("ncdownloader_info");
}
/**
* @NoAdminRequired
@@ -53,7 +48,7 @@ class MainController extends Controller
$params = array();
$params['aria2_running'] = $this->aria2->isRunning();
$params['aria2_installed'] = $this->aria2->isInstalled();
$params['youtube_installed'] = $this->youtube->isInstalled();
$params['youtube_installed'] = (bool) Helper::findBinaryPath('youtube-dl');
$response = new TemplateResponse($this->appName, 'Index', $params);