Allowing for manually setting binary path for both Aria2 and Youtube-dl
This commit is contained in:
@@ -36,7 +36,11 @@ class Application extends App
|
||||
});
|
||||
|
||||
$container->registerService('Youtube', function (IContainer $container) {
|
||||
return new Youtube(['downloadDir' => $this->getRealDownloadDir()]);
|
||||
$config = [
|
||||
'binary' => $this->settings->setType(Settings::TYPE['SYSTEM'])->get("ncd_yt_binary"),
|
||||
'downloadDir' => $this->getRealDownloadDir(),
|
||||
];
|
||||
return new Youtube($config);
|
||||
});
|
||||
|
||||
$container->registerService('Settings', function (IContainer $container) {
|
||||
@@ -112,8 +116,14 @@ class Application extends App
|
||||
if (is_array($customSettings = $this->settings->getAria2())) {
|
||||
$settings = array_merge($customSettings, $settings);
|
||||
}
|
||||
$token = $this->settings->setType(1)->get('ncd_rpctoken');
|
||||
$config = ['dir' => $realDownloadDir, 'conf_dir' => $aria2_dir, 'token' => $token, 'settings' => $settings];
|
||||
$token = $this->settings->setType(Settings::TYPE['SYSTEM'])->get('ncd_rpctoken');
|
||||
$config = [
|
||||
'dir' => $realDownloadDir,
|
||||
'conf_dir' => $aria2_dir,
|
||||
'token' => $token,
|
||||
'settings' => $settings,
|
||||
'binary' => $this->settings->setType(Settings::TYPE['SYSTEM'])->get('ncd_aria2_binary'),
|
||||
];
|
||||
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.2</version>
|
||||
<version>0.1.3</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