fixed bugs introduced in last version
This commit is contained in:
@@ -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.7.0</version>
|
<version>0.7.1</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>
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ class MainController extends Controller
|
|||||||
$params['youtube_installed'] = $this->youtube->isInstalled();
|
$params['youtube_installed'] = $this->youtube->isInstalled();
|
||||||
$params['youtube_bin'] = $this->youtube->getBin();
|
$params['youtube_bin'] = $this->youtube->getBin();
|
||||||
$params['youtube_executable'] = $this->youtube->isExecutable();
|
$params['youtube_executable'] = $this->youtube->isExecutable();
|
||||||
$params['ncd_hide_errors'] = $this->settings->get("ncd_hide_errors");
|
$params['ncd_hide_errors'] = $this->settings->get("ncd_hide_errors",null);
|
||||||
|
|
||||||
|
|
||||||
$params['counter'] = $this->counters->getCounters();
|
$params['counter'] = $this->counters->getCounters();
|
||||||
$params['settings_url'] = $this->urlGenerator->linkToRoute("settings.PersonalSettings.index", ['section' => 'ncdownloader']);
|
$params['settings_url'] = $this->urlGenerator->linkToRoute("settings.PersonalSettings.index", ['section' => 'ncdownloader']);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ window.addEventListener('DOMContentLoaded', function () {
|
|||||||
eventHandler.add("click", "#app-navigation", "#search-download", helper.showDownload);
|
eventHandler.add("click", "#app-navigation", "#search-download", helper.showDownload);
|
||||||
eventHandler.add("change", "#app-navigation", "#ncd-hide-errors", e => {
|
eventHandler.add("change", "#app-navigation", "#ncd-hide-errors", e => {
|
||||||
let data = {};
|
let data = {};
|
||||||
data["ncd_hide_errors"] = e.target.checked === "true";
|
data["ncd_hide_errors"] = e.target.checked;
|
||||||
const url = helper.generateUrl(basePath + "/personal/save");
|
const url = helper.generateUrl(basePath + "/personal/save");
|
||||||
Http.getInstance(url).setData(data).setHandler(resp => {
|
Http.getInstance(url).setData(data).setHandler(resp => {
|
||||||
if (resp['message']) {
|
if (resp['message']) {
|
||||||
|
|||||||
@@ -182,9 +182,11 @@ const helper = {
|
|||||||
showErrors(target) {
|
showErrors(target) {
|
||||||
let errors = document.querySelectorAll(target);
|
let errors = document.querySelectorAll(target);
|
||||||
errors.forEach(element => {
|
errors.forEach(element => {
|
||||||
helper.message(element.getAttribute('data-error-message'), 20000);
|
let msg;
|
||||||
|
if (msg = element.getAttribute('data-error-message'))
|
||||||
|
helper.message(msg, 20000);
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default helper
|
export default helper
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
extract($_);
|
extract($_);
|
||||||
$permission_error = sprintf("aria2 is installed but not executable.Please execute command sudo chmod 755 %s", $aria2_bin);
|
$errors = [];
|
||||||
if ($youtube_installed && !$youtube_executable) {
|
if ($aria2_installed && !$aria2_executable) {
|
||||||
$ytb_error = sprintf("youtube-dl is installed but not executable.Please execute command sudo chmod 755 %s", $youtube_bin);
|
array_push($errors, sprintf("aria2 is installed but not executable.Please execute command sudo chmod 755 %s", $aria2_bin));
|
||||||
} else if (!$youtube_installed && !$youtube_executable) {
|
|
||||||
$ytb_error = "youtube-dl is not installed!";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($youtube_installed && !$youtube_executable) {
|
||||||
|
array_push($errors, sprintf("youtube-dl is installed but not executable.Please execute command sudo chmod 755 %s", $youtube_bin));
|
||||||
|
} else if (!$youtube_installed) {
|
||||||
|
array_push($errors, "youtube-dl is not installed!");
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="app-navigation">
|
<div id="app-navigation">
|
||||||
<?php if ($ncd_hide_errors): ?>
|
<?php if (!$ncd_hide_errors): ?>
|
||||||
<?php if (isset($ytb_error)): ?>
|
<?php foreach ($errors as $error): ?>
|
||||||
<div data-error-message="<?php print $l->t($ytb_error);?>"></div>
|
<div data-error-message="<?php print $l->t($error);?>"></div>
|
||||||
<?php endif;?>
|
<?php endforeach;?>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
|
|
||||||
<div class="app-navigation-new" id="search-download" data-inputbox="form-input-wrapper">
|
<div class="app-navigation-new" id="search-download" data-inputbox="form-input-wrapper">
|
||||||
@@ -27,7 +32,7 @@ if ($youtube_installed && !$youtube_executable) {
|
|||||||
</button>
|
</button>
|
||||||
</button>
|
</button>
|
||||||
<?php elseif ($aria2_installed && !$aria2_executable): ?>
|
<?php elseif ($aria2_installed && !$aria2_executable): ?>
|
||||||
<button type="button" class="icon-power notinstalled" data-error-message="<?php print $l->t($permission_error);?>">
|
<button type="button" class="icon-power notinstalled" >
|
||||||
<?php print $l->t("aria2c is installed but not executable");?>
|
<?php print $l->t("aria2c is installed but not executable");?>
|
||||||
</button>
|
</button>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
extract($_);
|
extract($_);
|
||||||
$checked = '';
|
$checked = '';
|
||||||
|
$checkbox = $ncd_hide_errors ? "true" : "false";
|
||||||
if ($ncd_hide_errors) {
|
if ($ncd_hide_errors) {
|
||||||
$checked = "checked";
|
$checked = "checked";
|
||||||
}
|
}
|
||||||
@@ -16,7 +17,7 @@ if ($ncd_hide_errors) {
|
|||||||
<div id="app-settings-content">
|
<div id="app-settings-content">
|
||||||
<ul id="ncdownloader-settings-collapsible-container">
|
<ul id="ncdownloader-settings-collapsible-container">
|
||||||
<li class="ncdownloader-settings-item" data-tippy-content="check this to show or suppress errors">
|
<li class="ncdownloader-settings-item" data-tippy-content="check this to show or suppress errors">
|
||||||
<input class="checkbox" type="checkbox" value="<?php print($ncd_hide_errors);?>" <?php print($checked);?> id="ncd-hide-errors"><label for="ncd-hide-errors"><?php p($l->t('Hide Errors'));?></label>
|
<input class="checkbox" type="checkbox" value="<?php print($checkbox);?>" <?php print($checked);?> id="ncd-hide-errors"><label for="ncd-hide-errors"><?php p($l->t('Hide Errors'));?></label>
|
||||||
</li>
|
</li>
|
||||||
<li class="ncdownloader-settings-item">
|
<li class="ncdownloader-settings-item">
|
||||||
<a href="<?php p($l->t($settings_url));?>" title="<?php p($l->t('Personal Settings'));?>" >
|
<a href="<?php p($l->t($settings_url));?>" title="<?php p($l->t('Personal Settings'));?>" >
|
||||||
|
|||||||
Reference in New Issue
Block a user