add 获取视频文件 medaInfo 信息
This commit is contained in:
parent
fe815b455d
commit
d16f5264bf
@ -1,6 +1,6 @@
|
|||||||
const Router = require("koa-router")
|
const Router = require("koa-router")
|
||||||
const {getQqListData} = require("../util/getList/qq")
|
const {getQqListData} = require("../util/getList/qq")
|
||||||
const {getVideoTotalLength} = require("../util/utils")
|
const utils = require("../util/utils")
|
||||||
const KoaSSEStream = require('koa-sse-stream');
|
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");
|
||||||
@ -10,7 +10,16 @@ const router = new Router()
|
|||||||
|
|
||||||
router.get("/test", async (ctx) => {
|
router.get("/test", async (ctx) => {
|
||||||
let url = ctx.query.url
|
let url = ctx.query.url
|
||||||
ctx.body = getVideoTotalLength(url)
|
await utils.getMediaInfo(url).then(value => {
|
||||||
|
ctx.body = {
|
||||||
|
code: 0,
|
||||||
|
msg: "Test",
|
||||||
|
data: value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get("/getQqList", async (ctx) => {
|
router.get("/getQqList", async (ctx) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user