mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 08:52:19 -07:00
Address review: silently prepending the Scryfall named-picture URL to the download list whenever a non-English card language was active was surprising, consumed quota per card when it failed, and could grab the wrong (canon) art on name collisions, with no way to turn it off. The insert is now opt-in and user-controlled: changing the card language adds the template to the top of the download URLs once (persisted, documented in the re-import prompt, and editable/removable in the deck editor settings), while the picture loader no longer injects it at request time.
37 lines
983 B
C++
37 lines
983 B
C++
/**
|
|
* @file download_settings.h
|
|
* @ingroup NetworkSettings
|
|
*/
|
|
//! \todo Document this file.
|
|
|
|
#ifndef COCKATRICE_DOWNLOADSETTINGS_H
|
|
#define COCKATRICE_DOWNLOADSETTINGS_H
|
|
|
|
#include "settings_manager.h"
|
|
|
|
class DownloadSettings : public SettingsManager
|
|
{
|
|
Q_OBJECT
|
|
friend class SettingsCache;
|
|
|
|
static const QStringList DEFAULT_DOWNLOAD_URLS;
|
|
static const QString SCRYFALL_NAMED_LOCALIZED_URL;
|
|
|
|
public:
|
|
explicit DownloadSettings(const QString &, QObject *);
|
|
|
|
QStringList getAllURLs() const;
|
|
void setDownloadUrls(const QStringList &downloadURLs);
|
|
void resetToDefaultURLs();
|
|
[[nodiscard]] bool addLocalizedScryfallUrl();
|
|
[[nodiscard]] bool getPicDownload() const;
|
|
void setPicDownload(bool _picDownload);
|
|
[[nodiscard]] bool getDownloadSpoilersStatus() const;
|
|
void setDownloadSpoilerStatus(bool _spoilerStatus);
|
|
|
|
signals:
|
|
void picDownloadChanged();
|
|
void downloadSpoilerStatusChanged();
|
|
};
|
|
|
|
#endif // COCKATRICE_DOWNLOADSETTINGS_H
|