fix 种子名称

This commit is contained in:
theluyuan 2023-08-09 13:08:47 +08:00
parent 2f96522226
commit d7c34b7f26

View File

@ -15,7 +15,7 @@ function getId(url){
async function updateSeed(info, desc) { async function updateSeed(info, desc) {
let vinfo = await getVideoInfo(info.vid) let vinfo = await getVideoInfo(info.vid)
let form = new FormData() let form = new FormData()
form.append('file', fs.createReadStream(path.join(cwd(), "/tmp/torrent/" + info.seedName.replace(/\s/g, '.') + ".torrent"))) form.append('file', fs.createReadStream(path.join(cwd(), "/tmp/torrent/" + info.seedName.replace(/\s+/g, '.') + ".torrent")))
let ep = await getDownEp(info.vid) let ep = await getDownEp(info.vid)
console.log(ep) console.log(ep)
if(ep.start == ep.end){ if(ep.start == ep.end){
@ -93,7 +93,7 @@ async function sendSeed(info) {
// 重命名文件夹 // 重命名文件夹
fs.renameSync(info.oldPath, info.newPath); fs.renameSync(info.oldPath, info.newPath);
// 创建种子 // 创建种子
await createTorrent(info.newPath, path.join(cwd(), "/tmp/torrent/" + info.seedName.replace(/\s/g, '.') + ".torrent")) await createTorrent(info.newPath, path.join(cwd(), "/tmp/torrent/" + info.seedName.replace(/\s+/g, '.') + ".torrent"))
// 获取图片 // 获取图片
for (let i = 1; i < 4; i++) { for (let i = 1; i < 4; i++) {
let time = info.Duration let time = info.Duration