fixed #9; tweaked aria2 settings(including disabling certificate check);added aria2 event hooks;other minor changes;
This commit is contained in:
@@ -25,6 +25,7 @@ class Application extends App
|
||||
$this->uid = ($user) ? $user->getUID() : '';
|
||||
$this->settings = new Settings($this->uid);
|
||||
$this->dataDir = \OC::$server->getSystemConfig()->getValue('datadirectory');
|
||||
$this->appPath = \OC::$server->getAppManager()->getAppPath('ncdownloader');
|
||||
$this->userFolder = Helper::getUserFolder($this->uid);
|
||||
$container = $this->getContainer();
|
||||
$container->registerService('UserId', function (IContainer $container) {
|
||||
@@ -110,7 +111,6 @@ class Application extends App
|
||||
$realDownloadDir = $this->getRealDownloadDir();
|
||||
$this->torrentsDir = $this->settings->get('torrents_dir');
|
||||
$aria2_dir = $this->dataDir . "/aria2";
|
||||
//$this->appPath = \OC::$server->getAppManager()->getAppPath('ncdownloader');
|
||||
$settings['seed_time'] = $this->settings->get("ncd_seed_time");
|
||||
$settings['seed_ratio'] = $this->settings->get("ncd_seed_ratio");
|
||||
if (is_array($customSettings = $this->settings->getAria2())) {
|
||||
@@ -123,6 +123,8 @@ class Application extends App
|
||||
'token' => $token,
|
||||
'settings' => $settings,
|
||||
'binary' => $this->settings->setType(Settings::TYPE['SYSTEM'])->get('ncd_aria2_binary'),
|
||||
'startHook' => $this->appPath . "/hooks/startHook.sh",
|
||||
'completeHook' => $this->appPath . "/hooks/completeHook.sh",
|
||||
];
|
||||
return $config;
|
||||
}
|
||||
|
||||
@@ -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.4</version>
|
||||
<version>0.2.0</version>
|
||||
<licence>agpl</licence>
|
||||
<author mail="freefallbenson@gmail.com" homepage="https://github.com/shiningw">jiaxinhuang</author>
|
||||
<namespace>NCDownloader</namespace>
|
||||
|
||||
Reference in New Issue
Block a user