From a44f0c94287962288d2673def16d5cf90ad4cd0b Mon Sep 17 00:00:00 2001 From: huangjx Date: Sun, 17 Apr 2022 08:30:58 +0800 Subject: [PATCH 1/2] formatting code;bugfixes;bumped version --- appinfo/info.xml | 2 +- lib/Command/Aria2Command.php | 2 +- lib/Controller/Aria2Controller.php | 2 +- lib/Controller/MainController.php | 1 - lib/Tools/YoutubeHelper.php | 8 +++++- src/components/mainForm.vue | 42 +++++------------------------- 6 files changed, 16 insertions(+), 41 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 4687a8f..bdbfb31 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -8,7 +8,7 @@ Search for torrents within the app from mutiple BT sites; Control Aria2 and manage download tasks from the web; download videos from 700+ video sites(youtube,youku,vimo,dailymotion,twitter,facebook and the likes - 0.8.0 + 0.9.0 agpl jiaxinhuang NCDownloader diff --git a/lib/Command/Aria2Command.php b/lib/Command/Aria2Command.php index 4df71ff..d19e785 100644 --- a/lib/Command/Aria2Command.php +++ b/lib/Command/Aria2Command.php @@ -9,7 +9,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class Aria2Command extends base +class Aria2Command extends Base { public function __construct() { diff --git a/lib/Controller/Aria2Controller.php b/lib/Controller/Aria2Controller.php index b4a5b88..1951872 100644 --- a/lib/Controller/Aria2Controller.php +++ b/lib/Controller/Aria2Controller.php @@ -186,7 +186,7 @@ class Aria2Controller extends Controller if ($row = $this->dbconn->getByGid($gid)) { $filename = $row['filename']; $timestamp = $row['timestamp']; - $extra = unserialize($row['data']); + $extra = $this->dbconn->getExtra(($row['data'])); } else if (isset($value['files'][0]['path'])) { $parts = explode("/", ($path = $value['files'][0]['path'])); if (count($parts) > 1) { diff --git a/lib/Controller/MainController.php b/lib/Controller/MainController.php index fbaacb6..572447d 100644 --- a/lib/Controller/MainController.php +++ b/lib/Controller/MainController.php @@ -32,7 +32,6 @@ class MainController extends Controller $this->uid = $UserId; $this->l10n = $IL10N; //$this->rootFolder = $rootFolder; - OC_Util::setupFS(); $this->aria2 = $aria2; $this->aria2->init(); $this->urlGenerator = \OC::$server->getURLGenerator(); diff --git a/lib/Tools/YoutubeHelper.php b/lib/Tools/YoutubeHelper.php index b8d66da..4e9cc8d 100644 --- a/lib/Tools/YoutubeHelper.php +++ b/lib/Tools/YoutubeHelper.php @@ -17,6 +17,7 @@ class YoutubeHelper public $file = null; public $filesize = null; protected $pid = 0; + private static $instance = null; public function __construct() { $this->dbconn = new DbHelper(); @@ -26,7 +27,12 @@ class YoutubeHelper public static function create() { - return new static(); + + if (!self::$instance) { + self::$instance = new static(); + } + + return self::$instance; } public function getFilePath($output) { diff --git a/src/components/mainForm.vue b/src/components/mainForm.vue index 0e205df..bfd6a98 100644 --- a/src/components/mainForm.vue +++ b/src/components/mainForm.vue @@ -26,45 +26,15 @@
From b18b9a960fcfaceda1e0d58559193fdc4e39bd1b Mon Sep 17 00:00:00 2001 From: huangjx Date: Sun, 17 Apr 2022 08:33:48 +0800 Subject: [PATCH 2/2] added support for nc24;close #43 --- appinfo/info.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index bdbfb31..b592c1f 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -7,8 +7,8 @@ Search for torrents within the app from mutiple BT sites; Control Aria2 and manage download tasks from the web; download videos from 700+ video sites(youtube,youku,vimo,dailymotion,twitter,facebook and the likes - - 0.9.0 + + 0.9.1 agpl jiaxinhuang NCDownloader @@ -19,7 +19,8 @@ download videos from 700+ video sites(youtube,youku,vimo,dailymotion,twitter,fac https://user-images.githubusercontent.com/3911975/142445020-27ec389a-5437-4d28-acc0-5e757fd6897d.png https://github.com/shiningw/ncdownloader - + +