Skip to content

Commit

Permalink
Only search theme path for local images.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartm committed Aug 1, 2013
1 parent 57a4624 commit 2becf20
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions mythtv/libs/libmythui/mythuihelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1514,11 +1514,7 @@ MythImage *MythUIHelper::LoadCacheImage(QString srcfile, QString label,
if (!!(cacheMode & kCacheIgnoreDisk) || fi.exists())
{
// Now compare the time on the source versus our cached copy
if (!(cacheMode & kCacheIgnoreDisk))
FindThemeFile(srcfile);

QDateTime srcLastModified;
QFileInfo original(srcfile);

if ((srcfile.startsWith("http://")) ||
(srcfile.startsWith("https://")) ||
Expand All @@ -1529,8 +1525,19 @@ MythImage *MythUIHelper::LoadCacheImage(QString srcfile, QString label,
}
else if (srcfile.startsWith("myth://"))
srcLastModified = RemoteFile::LastModified(srcfile);
else if (original.exists())
srcLastModified = original.lastModified();
else
{
if (!(cacheMode & kCacheIgnoreDisk))
{
if (!FindThemeFile(srcfile))
return NULL;
}

QFileInfo original(srcfile);

if (original.exists())
srcLastModified = original.lastModified();
}

if (!!(cacheMode & kCacheIgnoreDisk) ||
(fi.lastModified() >= srcLastModified))
Expand Down

0 comments on commit 2becf20

Please sign in to comment.