formatting code;bugfixes;bumped version

This commit is contained in:
huangjx
2022-04-17 08:30:58 +08:00
parent 2ec569e2b5
commit a44f0c9428
6 changed files with 16 additions and 41 deletions

View File

@@ -8,7 +8,7 @@ Search for torrents within the app from mutiple BT sites;
Control Aria2 and manage download tasks from the web; Control Aria2 and manage download tasks from the web;
download videos from 700+ video sites(youtube,youku,vimo,dailymotion,twitter,facebook and the likes download videos from 700+ video sites(youtube,youku,vimo,dailymotion,twitter,facebook and the likes
</description> </description>
<version>0.8.0</version> <version>0.9.0</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="freefallbenson@gmail.com" homepage="https://github.com/shiningw">jiaxinhuang</author> <author mail="freefallbenson@gmail.com" homepage="https://github.com/shiningw">jiaxinhuang</author>
<namespace>NCDownloader</namespace> <namespace>NCDownloader</namespace>

View File

@@ -9,7 +9,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
class Aria2Command extends base class Aria2Command extends Base
{ {
public function __construct() public function __construct()
{ {

View File

@@ -186,7 +186,7 @@ class Aria2Controller extends Controller
if ($row = $this->dbconn->getByGid($gid)) { if ($row = $this->dbconn->getByGid($gid)) {
$filename = $row['filename']; $filename = $row['filename'];
$timestamp = $row['timestamp']; $timestamp = $row['timestamp'];
$extra = unserialize($row['data']); $extra = $this->dbconn->getExtra(($row['data']));
} else if (isset($value['files'][0]['path'])) { } else if (isset($value['files'][0]['path'])) {
$parts = explode("/", ($path = $value['files'][0]['path'])); $parts = explode("/", ($path = $value['files'][0]['path']));
if (count($parts) > 1) { if (count($parts) > 1) {

View File

@@ -32,7 +32,6 @@ class MainController extends Controller
$this->uid = $UserId; $this->uid = $UserId;
$this->l10n = $IL10N; $this->l10n = $IL10N;
//$this->rootFolder = $rootFolder; //$this->rootFolder = $rootFolder;
OC_Util::setupFS();
$this->aria2 = $aria2; $this->aria2 = $aria2;
$this->aria2->init(); $this->aria2->init();
$this->urlGenerator = \OC::$server->getURLGenerator(); $this->urlGenerator = \OC::$server->getURLGenerator();

View File

@@ -17,6 +17,7 @@ class YoutubeHelper
public $file = null; public $file = null;
public $filesize = null; public $filesize = null;
protected $pid = 0; protected $pid = 0;
private static $instance = null;
public function __construct() public function __construct()
{ {
$this->dbconn = new DbHelper(); $this->dbconn = new DbHelper();
@@ -26,7 +27,12 @@ class YoutubeHelper
public static function create() public static function create()
{ {
return new static();
if (!self::$instance) {
self::$instance = new static();
}
return self::$instance;
} }
public function getFilePath($output) public function getFilePath($output)
{ {

View File

@@ -26,45 +26,15 @@
<div class="download-controls-container"> <div class="download-controls-container">
<div v-if="checkboxes" id="select-value-extension-container"> <div v-if="checkboxes" id="select-value-extension-container">
<select :value="selectedExt" id="select-value-extension"> <select :value="selectedExt" id="select-value-extension">
<option <option id="defaultext" :value="selectedExt">Default</option>
id="defaultext"
:value="defaultext"
>
Default
</option>
<optgroup label="Video"> <optgroup label="Video">
<option <option id="mp4" value="mp4">mp4</option>
id="mp4" <option id="webm" value="webm">webm</option>
value="mp4"
>
mp4
</option>
<option
id="webm"
value="webm"
>
webm
</option>
</optgroup> </optgroup>
<optgroup label="Audio"> <optgroup label="Audio">
<option <option id="m4a" value="m4a">m4a</option>
id="m4a" <option id="mp3" value="mp3">mp3</option>
value="m4a" <option id="vorbis" value="vorbis">vorbis</option>
>
m4a
</option>
<option
id="mp3"
value="mp3"
>
mp3
</option>
<option
id="vorbis"
value="vorbis"
>
vorbis
</option>
</optgroup> </optgroup>
</select> </select>
</div> </div>