Ticket #7615: myth_imagecache2.diff
File myth_imagecache2.diff, 3.1 KB (added by , 14 years ago) |
---|
-
mythtv/libs/libmythui/mythuihelper.cpp
15 15 #include <QDesktopWidget> 16 16 #include <QStyleFactory> 17 17 #include <QThreadPool> 18 #include <QUrl> 18 19 19 20 #include "mythdirs.h" 20 21 #include "mythverbose.h" … … 29 30 #include "mythprogressdialog.h" 30 31 #include "mythimage.h" 31 32 #include "remotefile.h" 33 #include "mythcontext.h" 32 34 33 35 static MythUIHelper *mythui = NULL; 34 36 static QMutex uiLock; … … 1292 1294 if (cacheMode != kCacheIgnoreDisk) 1293 1295 FindThemeFile(srcfile); 1294 1296 1295 QFileInfo original(srcfile); 1297 QMutexLocker locker(d->m_cacheLock); 1298 if (d->imageCache.contains(label)) 1299 { 1300 if (d->CacheTrack[label] > QDateTime::currentDateTime().addSecs(-2).toTime_t() ) 1301 return d->imageCache[label]; 1302 } 1303 locker.unlock(); 1304 1305 QDateTime original_mod; 1306 1307 if (srcfile.startsWith("myth://")) { 1308 QUrl sgurl = QUrl(srcfile); 1309 1310 QStringList strlist( QString("QUERY_SG_FILEQUERY") ); 1311 strlist << sgurl.host(); 1312 strlist << sgurl.userName(); 1313 strlist << sgurl.path(); 1314 1315 if ( gContext->SendReceiveStringList(strlist) ) 1316 { 1317 if (strlist.size() > 1) 1318 original_mod = QDateTime::fromTime_t(strlist.at(1).toUInt()); 1319 } 1320 } else { 1321 QFileInfo original(srcfile); 1322 original_mod = original.lastModified(); 1323 } 1324 1296 1325 if ((cacheMode == kCacheIgnoreDisk) || 1297 (fi.lastModified() > original .lastModified()))1326 (fi.lastModified() > original_mod)) 1298 1327 { 1299 1328 // Check Memory Cache 1300 1329 ret = GetImageFromCache(label); -
mythtv/libs/libmythui/libmythui.pro
6 6 target.path = $${LIBDIR} 7 7 INSTALLS = target 8 8 9 INCLUDEPATH += ../libmythdb 9 INCLUDEPATH += ../libmythdb ../libmyth 10 10 INCLUDEPATH += ../.. ../ 11 11 12 12 LIBS += -L../libmythdb -lmythdb-$$LIBVERSION -
mythtv/programs/mythbackend/mainserver.cpp
2970 2970 2971 2971 VERBOSE(VB_FILE, QString("HandleSGFileQuery: group = %1 host = %2 filename = %3 wanthost = %4").arg(groupname).arg(host).arg(filename).arg(wantHost)); 2972 2972 2973 QString host_ip = gContext->GetSetting("BackendServerIP"); 2974 if (host_ip == wantHost) 2975 { 2976 wantHost = host; 2977 StorageGroup sg(groupname, host); 2978 QString m_filename = sg.FindRecordingFile(filename); 2979 2980 if (!m_filename.isEmpty()) 2981 { 2982 filename = m_filename; 2983 } 2984 } 2985 2973 2986 if (host.toLower() == wantHost.toLower()) 2974 2987 { 2975 2988 StorageGroup sg(groupname, host);