Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: waiting http task not show filename or url. #138

Merged
merged 3 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ <h2>Settings</h2>
<div class="task-info pull-left">
<span class="task-status" rel="tooltip" title="{{status}} {{#_v.error_msg}}{{errorCode}}{{/_v.error_msg}}"><i class="{{#_v.status_icon}}{{status}}{{/_v.status_icon}}"></i></span>
<span>{{#_v.format_size}}{{totalLength}}{{/_v.format_size}}</span>
{{#uploadLength}}<span>(up {{#_v.format_size}}{{uploadLength}}{{/_v.format_size}}){{/uploadLength}}
{{#uploadLength}}<span>(up {{#_v.format_size}}{{uploadLength}}{{/_v.format_size}})</span>{{/uploadLength}}
</div>
<div class="pull-right">
<div class="progress">
Expand Down
2 changes: 1 addition & 1 deletion js/aria2.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (typeof ARIA2=="undefined"||!ARIA2) var ARIA2=(function(){
var title = "Unknown";
if (result.bittorrent && result.bittorrent.info && result.bittorrent.info.name)
title = result.bittorrent.info.name;
else if (result.files[0].path.replace(
else if (result.files[0].path && result.files[0].path.replace(
new RegExp("^"+dir.replace(/\\/g, "/").replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')+"/?"), "").split("/").length) {
title = result.files[0].path.replace(new RegExp("^"+dir.replace(/\\/g, "/").replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')+"/?"), "").split("/");
if (result.bittorrent)
Expand Down
6 changes: 3 additions & 3 deletions js/yaaw.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ var YAAW = (function() {
var active_task_allowed_options = ["max-download-limit", "max-upload-limit"];
$("#ib-options-save").live("click", function() {
var options = {};
var gid = $(this).parents(".info-box").attr("data-gid")
var gid = $(this).parents(".info-box").attr("data-gid");
var status = $("#task-gid-"+gid).attr("data-status");
$.each($("#ib-options-form input"), function(n, e) {
if (status == "active" && active_task_allowed_options.indexOf(e.name) == -1)
Expand Down Expand Up @@ -498,7 +498,7 @@ var YAAW = (function() {

add_task: {
submit: function(_this) {
var uri = $("#uri-input").val() || $("#uri-textarea").val() && $("#uri-textarea").val().split("\n") ;
var uri = $("#uri-input").val() || $("#uri-textarea").val() && $("#uri-textarea").val().split("\n");
var options = {}, options_save = {};
$("#add-task-option input[name], #add-task-option textarea[name]").each(function(i, n) {
var name = n.getAttribute("name");
Expand Down Expand Up @@ -713,7 +713,7 @@ var YAAW = (function() {
contextmenu: {
init: function() {
$(".task").live("contextmenu", function(ev) {
var contextmenu_position_y = ev.clientY
var contextmenu_position_y = ev.clientY;
var contextmenu_position_x = ev.clientX;
if ($(window).height() - ev.clientY < 200) {
contextmenu_position_y = ev.clientY - $("#task-contextmenu").height();
Expand Down