parent
dfdf772e87
commit
b362a35ac1
10
download.go
10
download.go
|
|
@ -182,6 +182,16 @@ func (this *downloadEnv) RunDownload(req RunDownload_Req) (resp RunDownload_Resp
|
|||
return resp
|
||||
}
|
||||
}
|
||||
|
||||
downloadingFilePath := filepath.Join(downloadDir, "downloading.txt")
|
||||
if !isFileExists(downloadingFilePath) {
|
||||
err = ioutil.WriteFile(downloadingFilePath, []byte(req.M3u8Url), 0666)
|
||||
if err != nil {
|
||||
resp.ErrMsg = "os.WriteUrl error: " + err.Error()
|
||||
return resp
|
||||
}
|
||||
}
|
||||
|
||||
beginSeq := parseBeginSeq(m3u8Body)
|
||||
// 获取m3u8地址的内容体
|
||||
encInfo, err := this.getEncryptInfo(req.M3u8Url, string(m3u8Body))
|
||||
|
|
|
|||
|
|
@ -20,12 +20,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
ui->lineEdit_SkipTsCountFromHead->setPlaceholderText("[0,9999]");
|
||||
ui->lineEdit_SaveDir->setPlaceholderText(QString::fromStdString(GetWd()));
|
||||
m_syncUi.AddRunFnOn_OtherThread([this](){
|
||||
while(true)
|
||||
while(!this->m_syncUi.Get_Done())
|
||||
{
|
||||
QThread::msleep(50);
|
||||
if (this->m_syncUi.Get_Done()) {
|
||||
break;
|
||||
}
|
||||
m_syncUi.AddRunFnOn_UiThread([this](){
|
||||
GetProgress_Resp resp = GetProgress();
|
||||
ui->progressBar->setValue(resp.Percent);
|
||||
|
|
|
|||
Loading…
Reference in New Issue