Skip to content

Commit

Permalink
修复部分情况下离线下载未完成被判定为已完成
Browse files Browse the repository at this point in the history
  • Loading branch information
HFO4 committed Apr 26, 2018
1 parent 514ad47 commit 81abe89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// 应用命名空间
'app_namespace' => 'app',
// 应用调试模式
'app_debug' => false,
'app_debug' => true,
// 应用Trace
'app_trace' => false,
// 应用模式状态
Expand Down
2 changes: 1 addition & 1 deletion application/index/model/Aria2.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function flushStatus($id,$uid,$policy){
# code...
break;
}
if(($respondData["result"]["files"][$downloadInfo["file_index"]]["completedLength"] == $respondData["result"]["files"][$downloadInfo["file_index"]]["length"]) && $respondData["result"]["status"]=="active"){
if(($respondData["result"]["files"][$downloadInfo["file_index"]]["completedLength"] == $respondData["result"]["files"][$downloadInfo["file_index"]]["length"] && ($respondData["result"]["files"][$downloadInfo["file_index"]]["length"] !=0 )) && $respondData["result"]["status"]=="active"){
$this->setComplete($respondData["result"],$downloadInfo);
Db::name("download")->where("id",$id)
->update([
Expand Down

0 comments on commit 81abe89

Please sign in to comment.