add 新增查询MediaInfo接口
This commit is contained in:
parent
1978c950d7
commit
138dbf542f
@ -5,22 +5,22 @@ const KoaSSEStream = require('koa-sse-stream');
|
||||
const {dowload} = require("../util/download");
|
||||
const {addDownList, getDownList, setDownState} = require("../util/sql/download");
|
||||
const dayjs = require("dayjs")
|
||||
const {getMediaInfo} = require("../util/utils");
|
||||
const router = new Router()
|
||||
// const dowloadlist = []
|
||||
|
||||
// router.get("/test", async (ctx) => {
|
||||
// let url = ctx.query.url
|
||||
// await utils.createTorrent(url,'C:\\Users\\SummerTail\\Downloads\\Video\\斗破苍穹.年番.Fights.Break.Sphere.S05E06.2022.2160p.WEB-DL.H265.AAC-ADWeb.torrent').then(value => {
|
||||
// ctx.body = {
|
||||
// code: 0,
|
||||
// msg: "Test",
|
||||
// data: value
|
||||
// }
|
||||
// })
|
||||
|
||||
|
||||
|
||||
// })
|
||||
router.get("/getMediaInfo", async (ctx) => {
|
||||
let url = ctx.query.filePath
|
||||
let data
|
||||
await getMediaInfo(url).then(value => {
|
||||
data = value;
|
||||
})
|
||||
ctx.body = {
|
||||
code: 0,
|
||||
msg: "",
|
||||
data: data
|
||||
}
|
||||
})
|
||||
|
||||
router.get("/getQqList", async (ctx) => {
|
||||
let url = ctx.query.url
|
||||
@ -55,7 +55,6 @@ router.get("/test",async (ctx)=>{
|
||||
})
|
||||
|
||||
|
||||
|
||||
// 连接池
|
||||
const clientList = [];
|
||||
// koa-sse-stream 配置
|
||||
|
Loading…
Reference in New Issue
Block a user