Skip to content

Commit

Permalink
Don't perform last modified checks on internet images which are in th…
Browse files Browse the repository at this point in the history
…e memory cache, this causes an unnecessary delay.
  • Loading branch information
stuartm committed Aug 4, 2013
1 parent 998804f commit 95664a2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mythtv/libs/libmythui/mythuihelper.cpp
Expand Up @@ -1531,8 +1531,17 @@ MythImage *MythUIHelper::LoadCacheImage(QString srcfile, QString label,
(srcfile.startsWith("https://")) ||
(srcfile.startsWith("ftp://")))
{
srcLastModified =
GetMythDownloadManager()->GetLastModified(srcfile);
// If the image is in the memory cache then skip the last modified
// check, since memory cached images are loaded in the foreground
// this can cause an intolerable delay. The images won't stay in
// the cache forever and so eventually they will be checked.
if (ret)
srcLastModified = cacheFileInfo.lastModified();
else
{
srcLastModified =
GetMythDownloadManager()->GetLastModified(srcfile);
}
}
else if (srcfile.startsWith("myth://"))
srcLastModified = RemoteFile::LastModified(srcfile);
Expand Down

0 comments on commit 95664a2

Please sign in to comment.