mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
Qt: keep trying to download remaining thumbnails if any fail to open for writing (probably just illegal characters in filename)
This commit is contained in:
parent
7234544669
commit
c746115bbd
@ -231,9 +231,18 @@ void MainWindow::downloadNextPlaylistThumbnail(QString system, QString title, QS
|
||||
|
||||
if (!m_playlistThumbnailDownloadFile.open(QIODevice::WriteOnly))
|
||||
{
|
||||
m_playlistThumbnailDownloadProgressDialog->cancel();
|
||||
showMessageBox(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_FILE_WRITE_OPEN_FAILED), MainWindow::MSGBOX_TYPE_ERROR, Qt::ApplicationModal, false);
|
||||
m_failedThumbnails++;
|
||||
|
||||
RARCH_ERR("[Qt]: Could not open file for writing: %s\n", fileNameData);
|
||||
|
||||
if (m_pendingPlaylistThumbnails.count() > 0)
|
||||
{
|
||||
QHash<QString, QString> nextThumbnail = m_pendingPlaylistThumbnails.takeAt(0);
|
||||
downloadNextPlaylistThumbnail(nextThumbnail.value("db_name"), nextThumbnail.value("label_noext"), nextThumbnail.value("type"));
|
||||
}
|
||||
else
|
||||
m_playlistThumbnailDownloadProgressDialog->cancel();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -257,6 +257,19 @@ void MainWindow::downloadThumbnail(QString system, QString title, QUrl url)
|
||||
m_thumbnailDownloadProgressDialog->cancel();
|
||||
showMessageBox(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_FILE_WRITE_OPEN_FAILED), MainWindow::MSGBOX_TYPE_ERROR, Qt::ApplicationModal, false);
|
||||
RARCH_ERR("[Qt]: Could not open file for writing: %s\n", fileNameData);
|
||||
|
||||
if (m_thumbnailDownloadReply)
|
||||
{
|
||||
m_thumbnailDownloadReply->disconnect();
|
||||
m_thumbnailDownloadReply->abort();
|
||||
m_thumbnailDownloadReply->deleteLater();
|
||||
}
|
||||
|
||||
if (m_pendingThumbnailDownloadTypes.isEmpty())
|
||||
m_thumbnailDownloadProgressDialog->cancel();
|
||||
else
|
||||
downloadThumbnail(system, title);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user