Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
iikira committed Aug 26, 2018
1 parent ba09943 commit 8340bb7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
* 移动设备:
请选择对应的系统(android, darwin(ios系统)), 对应的CPU架构 (一般情况下是 arm, 除了少数手机的CPU架构要选 amd, 例如联想K800, 联想K900等), 对应的CPU或操作系统位数 (详见上表), 下载.

注意: Android5.0 以上的设备请不要下载使用linux版本的, 否则网络访问可能会出现问题.

## 注意

Android 5.0 以上的设备请不要下载使用linux版本的, 否则网络请求可能会出现问题.

相关的关键词, 均能在文件名中找到.

文件格式均为zip压缩包格式, 切勿未解压程序就直接运行!! 程序解压之后才可以正常使用.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ BaiduPCS-Go od

离线下载支持http/https/ftp/电驴/磁力链协议

离线下载同时进行的任务数量有限, 超出限制的部分将无法添加.

### 添加离线下载任务
```
BaiduPCS-Go offlinedl add -path=<离线下载文件保存的路径> 资源地址1 地址2 ...
Expand Down
2 changes: 1 addition & 1 deletion baidupcs/cloud_dl.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (pcs *BaiduPCS) cloudDlQueryTask(op string, taskIDs []int64) (cl CloudDlTas
PCSErrInfo: errInfo,
}

pcsError = handleJSONParse(op, dataReadCloser, &taskInfo)
pcsError = handleJSONParse(OperationCloudDlQueryTask, dataReadCloser, &taskInfo)
if pcsError != nil {
return
}
Expand Down
13 changes: 7 additions & 6 deletions internal/pcsfunctions/pcsupload/upload_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,22 +163,23 @@ func (ud *UploadingDatabase) Search(meta *checksum.LocalFileMeta) *uploader.Inst
}

func (ud *UploadingDatabase) clearModTimeChange() {
for k, uploading := range ud.UploadingList {
for i := 0; i < len(ud.UploadingList); i++ {
uploading := ud.UploadingList[i]
if uploading.LocalFileMeta == nil {
continue
}

info, err := os.Stat(uploading.LocalFileMeta.Path)
if err != nil {
ud.deleteIndex(k)
k--
pcsUploadVerbose.Infof("clear invalid file path: %s\n", uploading.LocalFileMeta.Path)
ud.deleteIndex(i)
i--
pcsUploadVerbose.Warnf("clear invalid file path: %s, err: %s\n", uploading.LocalFileMeta.Path, err)
continue
}

if uploading.LocalFileMeta.ModTime != info.ModTime().Unix() {
ud.deleteIndex(k)
k--
ud.deleteIndex(i)
i--
pcsUploadVerbose.Infof("clear modified file path: %s\n", uploading.LocalFileMeta.Path)
continue
}
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,7 @@ func main() {
Aliases: []string{"clouddl", "od"},
Usage: "离线下载",
Description: `支持http/https/ftp/电驴/磁力链协议
离线下载同时进行的任务数量有限, 超出限制的部分将无法添加.
示例:
Expand Down

0 comments on commit 8340bb7

Please sign in to comment.