fix 下载种子文件夹固定
This commit is contained in:
parent
f2fe0a0c51
commit
732be71a35
@ -53,7 +53,7 @@ async function updateSeed(info, desc) {
|
|||||||
responseType: 'stream',
|
responseType: 'stream',
|
||||||
proxy: false
|
proxy: false
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
response.data.pipe(fs.createWriteStream(path.join(cwd(), "/tmp/downtor/dow.torrent")));
|
response.data.pipe(fs.createWriteStream(path.join(cwd(), `/downtor/${new Date().getTime()}.torrent)));
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ async function sendSeed(info) {
|
|||||||
// 删除tmp
|
// 删除tmp
|
||||||
await deleteFolder(path.join(cwd(), "/tmp"))
|
await deleteFolder(path.join(cwd(), "/tmp"))
|
||||||
await mkdirRecursions(path.join(cwd(), "/tmp/torrent/"))
|
await mkdirRecursions(path.join(cwd(), "/tmp/torrent/"))
|
||||||
await mkdirRecursions(path.join(cwd(), "/tmp/downtor/"))
|
await mkdirRecursions(path.join(cwd(), "/downtor/"))
|
||||||
await mkdirRecursions(path.join(cwd(), "/tmp/imgs/"))
|
await mkdirRecursions(path.join(cwd(), "/tmp/imgs/"))
|
||||||
// 重命名文件夹
|
// 重命名文件夹
|
||||||
fs.renameSync(info.oldPath, info.newPath);
|
fs.renameSync(info.oldPath, info.newPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user