Fix codecs update threading
This commit is contained in:
parent
d5f8c1af0a
commit
aef8d4b6c5
2 changed files with 2 additions and 1 deletions
|
|
@ -85,6 +85,7 @@ void DownloadablePayloadTypeCore::setSelf(QSharedPointer<DownloadablePayloadType
|
|||
}
|
||||
|
||||
void DownloadablePayloadTypeCore::downloadAndExtract(bool isUpdate) {
|
||||
mustBeInMainThread(log().arg(Q_FUNC_INFO));
|
||||
lInfo() << log().arg("Downloading `%1` codec...").arg(mMimeType);
|
||||
auto codecsFolder = Paths::getCodecsDirPath();
|
||||
QString versionFilePath = codecsFolder + mMimeType + ".txt";
|
||||
|
|
|
|||
|
|
@ -1396,7 +1396,7 @@ QList<QSharedPointer<DownloadablePayloadTypeCore>> Utils::getDownloadableVideoPa
|
|||
|
||||
void Utils::checkDownloadedCodecsUpdates() {
|
||||
for (auto codec : getDownloadableVideoPayloadTypes()) {
|
||||
if (codec->shouldDownloadUpdate()) codec->downloadAndExtract(true);
|
||||
if (codec->shouldDownloadUpdate()) App::postCoreAsync([codec]() { codec->downloadAndExtract(true); });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue