Go to the documentation of this file.
20 m_list(std::move(list)),
46 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'MythArtworkResults'");
50 for (
const auto &
info : std::as_const(
m_list))
53 button->SetText(
info.label,
"label");
54 button->SetText(
info.thumbnail,
"thumbnail");
55 button->SetText(
info.url,
"url");
56 QString width = QString::number(
info.width);
57 QString height = QString::number(
info.height);
58 button->SetText(width,
"width");
59 button->SetText(height,
"height");
60 if (
info.width > 0 &&
info.height > 0)
61 button->SetText(QString(
"%1x%2").arg(width, height),
64 QString artfile =
info.thumbnail;
66 if (artfile.isEmpty())
72 if (!artfile.isEmpty())
77 button->SetImage(dlfile);
82 QVariant::fromValue<uint>(pos));
86 button->SetData(QVariant::fromValue<ArtworkInfo>(
info));
99 QString cache = QString(
"%1/cache/metadata-thumbcache")
101 QDir cacheDir(cache);
102 QStringList thumbs = cacheDir.entryList(QDir::Files);
104 for (
auto i = thumbs.crbegin(); i != thumbs.crend(); ++i)
106 QString
filename = QString(
"%1/%2").arg(cache, *i);
108 QDateTime lastmod = fi.lastModified();
111 LOG(VB_GENERAL, LOG_DEBUG, QString(
"Deleting file %1")
static const Type kEventType
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Screen in which all other widgets are contained and rendered.
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
ImageSearchResultsDialog(MythScreenStack *lparent, ArtworkList list, VideoArtworkType type)
void BuildFocusList(void)
MetadataImageDownload * m_imageDownload
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
void haveResult(ArtworkInfo, VideoArtworkType)
void customEvent(QEvent *event) override
MythUIButtonList * m_resultsList
void sendResult(MythUIButtonListItem *item)
static void cleanCacheDir()
~ImageSearchResultsDialog() override