添加downloading.txt文件

main v1.18.1
orestonce 2023-11-15 22:47:45 +08:00
parent dfdf772e87
commit b362a35ac1
2 changed files with 11 additions and 4 deletions

View File

@ -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))

View File

@ -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);