add 种子制作
This commit is contained in:
@@ -35,8 +35,16 @@ async function addVideoInfo(cover){
|
||||
|
||||
}
|
||||
|
||||
// 获取当前剧集是否下载完成
|
||||
async function getMediaState(vid){
|
||||
let sql = `select * from download where vid=? and state!=1`
|
||||
let list = await getAll(sql,vid)
|
||||
return !list.length
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
addDownList,
|
||||
getDownList,
|
||||
setDownState
|
||||
setDownState,
|
||||
getMediaState
|
||||
}
|
||||
@@ -8,8 +8,8 @@ async function addSub(info){
|
||||
if(list.length != 0){
|
||||
return "订阅已存在"
|
||||
}
|
||||
let sql = `insert into VideoInfo(name,rename,skip,desc,url,subtitle,img,year,time,subTime,enable,season,sid,count) values(?,?,?,?,?,?,?,?,?,${new Date().getTime()},1,?,?,?)`
|
||||
await run(sql,info.name,info.rename,info.skip,info.desc,info.url,info.subtitle,info.img,info.year,info.time,info.season,info.sid,info.count)
|
||||
let sql = `insert into VideoInfo(name,rename,skip,desc,url,subtitle,img,year,time,subTime,enable,season,sid,count,imdb) values(?,?,?,?,?,?,?,?,?,${new Date().getTime()},1,?,?,?,?)`
|
||||
await run(sql,info.name,info.rename,info.skip,info.desc,info.url,info.subtitle,info.img,info.year,info.time,info.season,info.sid,info.count,info.imdb)
|
||||
}
|
||||
|
||||
// 获取所有订阅 (不包括已完成)
|
||||
|
||||
Reference in New Issue
Block a user