示例#1
0
def getUploadM3u8():
    workId = request.args.get("workId")
    instance = UploadWrap()
    (isFind, m3u8Path) = instance.get_m3u8(workId)
    if (isFind == False):
        resultData(False, "找不到任务", None)
    return resultData(True, "", {"m3u8": m3u8Path})
示例#2
0
def startUpload():
    m3u8Input = request.args.get("m3u8Input")
    splitPathInput = request.args.get("splitPathInput")

    instance = UploadWrap()
    workId = instance.startWork(m3u8Input, splitPathInput)
    return resultData(True, "", workId)
示例#3
0
def getUploadStatusAndLog():
    workId = request.args.get("workId")
    instance = UploadWrap()
    (isFind, logs) = instance.get_log(workId)
    (isFind, status) = instance.get_status(workId)

    if (isFind == False):
        resultData(False, "找不到任务", None)

    return resultData(True, "", {"logs": logs, "status": status})