add 移动多文件
This commit is contained in:
@@ -2,7 +2,7 @@ const fs = require("fs")
|
||||
const { getMediaState } = require("../sql/download.js");
|
||||
const path = require("path");
|
||||
const { cwd } = require("process");
|
||||
const { createTorrent, getVideoSpecifyTimeImage, uploadImg, getMediaInfoSend, deleteFolder } = require("../utils.js");
|
||||
const { createTorrent, getVideoSpecifyTimeImage, uploadImg, getMediaInfoSend, deleteFolder, moveDir } = require("../utils.js");
|
||||
const { getVideoInfo } = require("../sql/video.js");
|
||||
const { mkdirRecursions } = require("../markdir.js");
|
||||
const { default: axios } = require("axios");
|
||||
@@ -106,11 +106,10 @@ async function sendSeed(info) {
|
||||
}
|
||||
// 移动到做种文件夹
|
||||
mkdirRecursions(newDir + "/" + info.seedName + "/")
|
||||
fs.renameSync(info.newPath + "/" + info.rname, newDir + "/" + info.seedName + "/" + info.rname);
|
||||
// fs.renameSync(info.newPath + "/" + info.rname, newDir + "/" + info.seedName + "/" + info.rname);
|
||||
moveDir(info.newPath + "/" ,newDir + "/" + info.seedName + "/")
|
||||
// 删除下载的文件夹
|
||||
deleteFolder(info.newPath)
|
||||
|
||||
|
||||
} else {
|
||||
console.log("未下载完成")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user