add 新增查询MediaInfo接口

This commit is contained in:
SummerTail 2023-07-02 00:18:16 +08:00
parent 1978c950d7
commit 138dbf542f

View File

@ -5,22 +5,22 @@ const KoaSSEStream = require('koa-sse-stream');
const {dowload} = require("../util/download"); const {dowload} = require("../util/download");
const {addDownList, getDownList, setDownState} = require("../util/sql/download"); const {addDownList, getDownList, setDownState} = require("../util/sql/download");
const dayjs = require("dayjs") const dayjs = require("dayjs")
const {getMediaInfo} = require("../util/utils");
const router = new Router() const router = new Router()
// const dowloadlist = [] // const dowloadlist = []
// router.get("/test", async (ctx) => { router.get("/getMediaInfo", async (ctx) => {
// let url = ctx.query.url let url = ctx.query.filePath
// await utils.createTorrent(url,'C:\\Users\\SummerTail\\Downloads\\Video\\斗破苍穹.年番.Fights.Break.Sphere.S05E06.2022.2160p.WEB-DL.H265.AAC-ADWeb.torrent').then(value => { let data
// ctx.body = { await getMediaInfo(url).then(value => {
// code: 0, data = value;
// msg: "Test", })
// data: value ctx.body = {
// } code: 0,
// }) msg: "",
data: data
}
})
// })
router.get("/getQqList", async (ctx) => { router.get("/getQqList", async (ctx) => {
let url = ctx.query.url let url = ctx.query.url
@ -50,12 +50,11 @@ router.get("/startDown", async (ctx) => {
} }
}) })
router.get("/test",async (ctx)=>{ router.get("/test", async (ctx) => {
utils.getVideoSpecifyTimeImage("D:/aaa/梦中的那片海/梦中的那片海 第01集.mp4",46,"D:/aaa/梦中的那片海/aaa.jpg") utils.getVideoSpecifyTimeImage("D:/aaa/梦中的那片海/梦中的那片海 第01集.mp4", 46, "D:/aaa/梦中的那片海/aaa.jpg")
}) })
// 连接池 // 连接池
const clientList = []; const clientList = [];
// koa-sse-stream 配置 // koa-sse-stream 配置