mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Qt: scrub thumbnail titles according to No-Intro before downloading, fixes #7149
This commit is contained in:
parent
c746115bbd
commit
95ad8798ee
@ -201,6 +201,7 @@ void MainWindow::downloadNextPlaylistThumbnail(QString system, QString title, QS
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
title = getScrubbedString(title);
|
||||
systemUnderscore = systemUnderscore.replace(" ", "_");
|
||||
|
||||
urlString = QString(THUMBNAIL_URL_HEADER) + systemUnderscore + THUMBNAIL_URL_BRANCH + type + "/" + title + THUMBNAIL_URL_FOOTER;
|
||||
|
@ -221,6 +221,7 @@ void MainWindow::downloadThumbnail(QString system, QString title, QUrl url)
|
||||
if (!settings || m_pendingThumbnailDownloadTypes.isEmpty())
|
||||
return;
|
||||
|
||||
title = getScrubbedString(title);
|
||||
downloadType = m_pendingThumbnailDownloadTypes.takeFirst();
|
||||
|
||||
systemUnderscore = systemUnderscore.replace(" ", "_");
|
||||
|
@ -3152,6 +3152,18 @@ int MainWindow::onExtractArchive(QString path, QString extractionDir, QString te
|
||||
return returnerr;
|
||||
}
|
||||
|
||||
QString MainWindow::getScrubbedString(QString str)
|
||||
{
|
||||
const QLatin1Literal chars("&*/:`\"<>?\\|");
|
||||
|
||||
foreach (QChar ch, chars)
|
||||
{
|
||||
str.replace(ch, "_");
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
static void* ui_window_qt_init(void)
|
||||
{
|
||||
ui_window.qtWindow = new MainWindow();
|
||||
|
@ -287,6 +287,7 @@ public:
|
||||
static double lerp(double x, double y, double a, double b, double d);
|
||||
QString getSpecialPlaylistPath(SpecialPlaylist playlist);
|
||||
QVector<QPair<QString, QString> > getPlaylists();
|
||||
QString getScrubbedString(QString str);
|
||||
|
||||
signals:
|
||||
void thumbnailChanged(const QPixmap &pixmap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user