fix 种子名称

This commit is contained in:
theluyuan 2023-08-09 12:38:04 +08:00
parent 5ec1f25d2a
commit 2f96522226

View File

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