Ticket #6813: 128-UpcomingMediaLibrary.w178.patch
File 128-UpcomingMediaLibrary.w178.patch, 30.5 KB (added by , 14 years ago) |
---|
-
mythtv/libs/libmyth/programinfo.h
old new enum AvailableStatusType { 192 192 asPendingDelete, 193 193 asFileNotFound, 194 194 asZeroByte, 195 asDeleted 195 asDeleted, 196 asFutureRecording 196 197 }; 197 198 198 199 enum WatchListStatus { -
mythtv/libs/libmyth/remoteutil.cpp
old new 11 11 #include "storagegroup.h" 12 12 #include "mythevent.h" 13 13 14 vector<ProgramInfo *> *RemoteGetRecordedList(bool deltype )14 vector<ProgramInfo *> *RemoteGetRecordedList(bool deltype, int upcomingLevel) 15 15 { 16 16 QString str = "QUERY_RECORDINGS "; 17 17 if (deltype) … … vector<ProgramInfo *> *RemoteGetRecorded 23 23 24 24 vector<ProgramInfo *> *info = new vector<ProgramInfo *>; 25 25 26 if (!RemoteGetRecordingList(info, strlist ))26 if (!RemoteGetRecordingList(info, strlist, upcomingLevel)) 27 27 { 28 28 delete info; 29 29 return NULL; 30 30 } 31 32 // VERBOSE(VB_GENERAL, QString("Got %1 items for upcomingLevel %2") 33 // .arg(info->size()).arg(upcomingLevel)); 31 34 32 35 return info; 33 36 } … … void RemoteGetAllExpiringRecordings(vect 191 194 RemoteGetRecordingList(&expiringlist, strList); 192 195 } 193 196 194 int RemoteGetRecordingList(vector<ProgramInfo *> *reclist, QStringList &strList )197 int RemoteGetRecordingList(vector<ProgramInfo *> *reclist, QStringList &strList, int upcomingLevel) 195 198 { 196 199 if (!gContext->SendReceiveStringList(strList)) 197 200 return 0; … … int RemoteGetRecordingList(vector<Progra 215 218 } 216 219 } 217 220 218 return numrecordings; 221 int numupcomingrecordings = 0; 222 223 if (upcomingLevel > 0) 224 { 225 QString str = "QUERY_GETALLPENDING"; 226 227 QStringList upcomingRecordings(str); 228 229 if (!gContext->SendReceiveStringList(upcomingRecordings)) 230 return 0; 231 232 numupcomingrecordings = upcomingRecordings[1].toInt(); 233 234 if (numupcomingrecordings > 0) 235 { 236 if (numupcomingrecordings * NUMPROGRAMLINES + 1 > (int)upcomingRecordings.size()) 237 { 238 cerr << "length mismatch between programinfo and upcomingRecordings\n"; 239 return 0; 240 } 241 242 QStringList::const_iterator it = upcomingRecordings.begin() + 2; 243 for (int i = 0; i < numupcomingrecordings; i++) 244 { 245 ProgramInfo *pginfo = new ProgramInfo(); 246 pginfo->FromStringList(it, upcomingRecordings.end()); 247 if (pginfo->recstatus == rsWillRecord || pginfo->recstatus == rsConflict || 248 (upcomingLevel >= 2 && pginfo->recstatus == rsInactive) || 249 (upcomingLevel >= 3 && pginfo->recstatus >= rsWillRecord)) 250 251 reclist->push_back(pginfo); 252 else 253 delete pginfo; 254 } 255 } 256 } 257 258 return numrecordings + numupcomingrecordings; 219 259 } 220 260 221 261 vector<ProgramInfo *> *RemoteGetConflictList(const ProgramInfo *pginfo) -
mythtv/libs/libmyth/remoteutil.h
old new class MPUBLIC FileSystemInfo 30 30 int weight; 31 31 }; 32 32 33 MPUBLIC vector<ProgramInfo *> *RemoteGetRecordedList(bool deltype );33 MPUBLIC vector<ProgramInfo *> *RemoteGetRecordedList(bool deltype, int upcomingLevel = 0); 34 34 MPUBLIC vector<FileSystemInfo> RemoteGetFreeSpace(void); 35 35 MPUBLIC bool RemoteGetLoad(float load[3]); 36 36 MPUBLIC bool RemoteGetUptime(time_t &uptime); … … void RemoteGetAllScheduledRecordings(vec 47 47 MPUBLIC 48 48 void RemoteGetAllExpiringRecordings(vector<ProgramInfo *> &expiringlist); 49 49 MPUBLIC int RemoteGetRecordingList(vector<ProgramInfo *> *reclist, 50 QStringList &strList );50 QStringList &strList, int upcomingLevel = 0); 51 51 MPUBLIC vector<ProgramInfo *> *RemoteGetConflictList(const ProgramInfo *pginfo); 52 52 MPUBLIC void RemoteSendMessage(const QString &message); 53 53 MPUBLIC void RemoteSendEvent(const MythEvent &event); -
mythtv/programs/mythfrontend/playbackbox.cpp
old new static QString extract_main_state(const 267 267 if (pginfo.recstatus == rsRecording) 268 268 state = "running"; 269 269 270 if (((pginfo.recstatus !=rsRecording) &&270 if (((pginfo.recstatus < rsRecording) && 271 271 (pginfo.availableStatus != asAvailable) && 272 272 (pginfo.availableStatus != asNotYetAvailable)) || 273 273 (player && player->IsSameProgram(0, &pginfo))) 274 274 { 275 275 state = "disabled"; 276 276 } 277 if (pginfo.recstatus > rsRecording) 278 state = "future"; 277 279 278 280 return state; 279 281 } … … PlaybackBox::PlaybackBox(MythScreenStack 381 383 m_watchGroupName(tr("Watch List")), 382 384 m_watchGroupLabel(m_watchGroupName.toLower()), 383 385 m_viewMask(VIEW_TITLES), 386 m_showUpcomingLevel(1), // 1 = recording or conflicting, 2 = important (inactive), 3 = all 384 387 385 388 // General m_popupMenu support 386 389 m_popupMenu(NULL), … … PlaybackBox::PlaybackBox(MythScreenStack 421 424 "DisplayGroupDefaultViewMask", 422 425 VIEW_TITLES | VIEW_WATCHED); 423 426 427 /* Values for showUpcomingLevel 428 1 - recording or conflicting 429 2 - important (inactive rules) 430 3 - all 431 */ 432 m_showUpcomingLevel = gContext->GetNumSetting("ShowUpcomingLevel", 1); 433 424 434 // Translate these external settings into mask values 425 435 if (gContext->GetNumSetting("PlaybackWatchList", 1) && 426 436 !(m_viewMask & VIEW_WATCHLIST)) … … bool PlaybackBox::Create() 567 577 } 568 578 569 579 BuildFocusList(); 570 m_programInfoCache.ScheduleLoad();580 ScheduleLoad(); 571 581 LoadInBackground(); 572 582 573 583 return true; 574 584 } 575 585 586 void PlaybackBox::ScheduleLoad(void) 587 { 588 m_programInfoCache.ScheduleLoad( (m_viewMask & PlaybackBox::VIEW_UPCOMING) ? m_showUpcomingLevel: 0); 589 } 590 576 591 void PlaybackBox::Load(void) 577 592 { 578 593 m_programInfoCache.WaitForLoadToComplete(); … … void PlaybackBox::UpdateUIListItem( 817 832 818 833 item->DisplayState(rating, "ratingstate"); 819 834 820 QString oldimgfile = item->GetImage("preview"); 821 if (oldimgfile.isEmpty() || force_preview_reload) 822 m_helper.GetPreviewImage(*pginfo); 835 QString oldimgfile; 836 if (pginfo->recstatus <= rsRecording) 837 { 838 oldimgfile = item->GetImage("preview"); 839 if (oldimgfile.isEmpty() || force_preview_reload) 840 m_helper.GetPreviewImage(*pginfo); 841 } 823 842 824 843 if ((GetFocusWidget() == m_recordingList) && is_sel) 825 844 { … … void PlaybackBox::UpdateUIListItem( 842 861 843 862 if (m_previewImage) 844 863 { 845 m_previewImage->SetFilename(oldimgfile); 846 m_previewImage->Load(); 864 if (pginfo->recstatus <= rsRecording) 865 { 866 m_previewImage->SetFilename(oldimgfile); 867 m_previewImage->Load(); 868 } 869 else 870 m_previewImage->Reset(); 847 871 } 848 872 849 873 if (m_fanart || m_banner || m_coverart) … … void PlaybackBox::updateRecList(MythUIBu 1210 1234 subtitleFlags[SUB_NORMAL] = "subtitles"; 1211 1235 subtitleFlags[SUB_HARDHEAR] = "cc"; 1212 1236 1237 MythUIButtonListItem *toSelect = NULL; 1213 1238 ProgramList::iterator it = progList.begin(); 1214 1239 for (; it != progList.end(); ++it) 1215 1240 { … … void PlaybackBox::updateRecList(MythUIBu 1220 1245 MythUIButtonListItem *item = 1221 1246 new PlaybackBoxListItem(this, m_recordingList, *it); 1222 1247 1248 if ( toSelect == NULL && (*it)->recstatus < rsWillRecord) 1249 toSelect = item; 1250 1223 1251 QString state = extract_main_state(**it, m_player); 1224 1252 1225 1253 item->SetFontState(state); … … void PlaybackBox::updateRecList(MythUIBu 1277 1305 } 1278 1306 } 1279 1307 1308 if (toSelect) 1309 m_recordingList->SetItemCurrent(toSelect); 1310 1280 1311 if (m_noRecordingsText) 1281 1312 { 1282 1313 if (!progList.empty()) … … static bool save_position( 1297 1328 QStringList &groupSelPref, QStringList &itemSelPref, 1298 1329 QStringList &itemTopPref) 1299 1330 { 1331 VERBOSE(VB_GENERAL, QString("Saving rlcount = %1").arg(recordingList->GetCount())); 1300 1332 MythUIButtonListItem *prefSelGroup = groupList->GetItemCurrent(); 1301 1333 if (!prefSelGroup) 1302 1334 return false; 1303 1335 1336 VERBOSE(VB_GENERAL, QString("Saving 1 prefSelGroup '%1'").arg(prefSelGroup->GetData().toString())); 1304 1337 groupSelPref.push_back(prefSelGroup->GetData().toString()); 1305 1338 for (int i = groupList->GetCurrentPos(); 1306 1339 i < groupList->GetCount(); i++) … … static bool save_position( 1311 1344 } 1312 1345 1313 1346 int curPos = recordingList->GetCurrentPos(); 1347 VERBOSE(VB_GENERAL, QString("Saving 2 curPos %1").arg(curPos)); 1314 1348 for (int i = curPos; (i >= 0) && (i < recordingList->GetCount()); i++) 1315 1349 { 1316 1350 MythUIButtonListItem *item = recordingList->GetItemAt(i); … … static bool save_position( 1327 1361 } 1328 1362 1329 1363 int topPos = recordingList->GetTopItemPos(); 1364 VERBOSE(VB_GENERAL, QString("Saving 3 topPos %1").arg(topPos)); 1330 1365 for (int i = topPos + 1; i >= topPos - 1; i--) 1331 1366 { 1332 1367 if (i >= 0 && i < recordingList->GetCount()) … … static bool save_position( 1346 1381 } 1347 1382 } 1348 1383 1384 VERBOSE(VB_GENERAL, "Saving done"); 1349 1385 return true; 1350 1386 } 1351 1387 … … static void restore_position( 1354 1390 const QStringList &groupSelPref, const QStringList &itemSelPref, 1355 1391 const QStringList &itemTopPref) 1356 1392 { 1393 VERBOSE(VB_GENERAL, QString("Trying to restore")); 1357 1394 // If possible reselect the item selected before, 1358 1395 // otherwise select the nearest available item. 1359 1396 MythUIButtonListItem *prefSelGroup = groupList->GetItemCurrent(); … … static void restore_position( 1366 1403 1367 1404 // the group is selected in UpdateUIGroupList() 1368 1405 QString groupname = prefSelGroup->GetData().toString(); 1406 VERBOSE(VB_GENERAL, QString("Trying to restore groupname = '%1'").arg(groupname)); 1369 1407 1370 1408 // find best selection 1371 1409 int sel = -1; 1410 1411 VERBOSE(VB_GENERAL, QString("Trying to restore itemSelPref.size() = %1").arg((uint)itemSelPref.size())); 1372 1412 for (uint i = 0; i+1 < (uint)itemSelPref.size(); i+=2) 1373 1413 { 1374 1414 if (itemSelPref[i] != groupname) … … static void restore_position( 1390 1430 1391 1431 // find best top item 1392 1432 int top = -1; 1433 VERBOSE(VB_GENERAL, QString("Trying to restore itemTopPref.size() = %1").arg((uint)itemTopPref.size())); 1393 1434 for (uint i = 0; i+1 < (uint)itemTopPref.size(); i+=2) 1394 1435 { 1395 1436 if (itemTopPref[i] != groupname) … … static void restore_position( 1411 1452 1412 1453 if (sel >= 0) 1413 1454 { 1414 //VERBOSE(VB_IMPORTANT, QString("Reselect success (%1,%2)")1415 //.arg(sel).arg(top));1455 VERBOSE(VB_IMPORTANT, QString("Reselect success (%1,%2)") 1456 .arg(sel).arg(top)); 1416 1457 recordingList->SetItemCurrent(sel, top); 1417 1458 } 1418 1459 else 1419 1460 { 1420 //VERBOSE(VB_GENERAL, QString("Reselect failure (%1,%2)")1421 //.arg(sel).arg(top));1461 VERBOSE(VB_GENERAL, QString("Reselect failure (%1,%2)") 1462 .arg(sel).arg(top)); 1422 1463 } 1423 1464 } 1424 1465 … … bool PlaybackBox::UpdateUILists(void) 1498 1539 vector<ProgramInfo*> list; 1499 1540 bool newest_first = (0==m_allOrder) || (kDeleteBox==m_type); 1500 1541 m_programInfoCache.GetOrdered(list, newest_first); 1542 1543 VERBOSE(VB_GENERAL, QString("Got %1 items in list from m_programInfoCache").arg(list.size())); 1544 1501 1545 vector<ProgramInfo*>::const_iterator it = list.begin(); 1502 1546 for ( ; it != list.end(); ++it) 1503 1547 { … … bool PlaybackBox::UpdateUILists(void) 1528 1572 (p->programflags & FL_WATCHED)) 1529 1573 continue; 1530 1574 1575 if ((! (m_viewMask & VIEW_RECORDED)) && 1576 p->recstatus < rsWillRecord) 1577 continue; 1578 1531 1579 if (m_viewMask != VIEW_NONE && 1532 1580 (p->recgroup != "LiveTV" || m_recGroup == "LiveTV")) 1533 1581 m_progLists[""].push_front(p); … … void PlaybackBox::deleteSelected(MythUIB 2013 2061 if (!pginfo) 2014 2062 return; 2015 2063 2064 if (pginfo->recstatus >= rsWillRecord) 2065 { 2066 EditRecording(pginfo); 2067 UpdateUILists(); 2068 return; 2069 } 2070 2016 2071 bool undelete_possible = 2017 2072 gContext->GetNumSetting("AutoExpireInsteadOfDelete", 0); 2018 2073 … … bool PlaybackBox::Play(const ProgramInfo 2182 2237 if (m_player) 2183 2238 return true; 2184 2239 2240 if (asFutureRecording == rec.availableStatus || rec.recstatus >= rsWillRecord) 2241 { 2242 ProgramInfo *tmppi = CurrentItem(); 2243 EditRecording(tmppi); 2244 2245 UpdateUILists(); 2246 return false; 2247 } 2248 2185 2249 if ((asAvailable != rec.availableStatus) || (0 == rec.filesize) || 2186 2250 (rec.GetRecordBasename() == rec.pathname)) 2187 2251 { … … bool PlaybackBox::keyPressEvent(QKeyEven 3755 3819 ShowGroupPopup(); 3756 3820 } 3757 3821 } 3822 3823 else if (action == "5") // not Yellow button / ":" 3824 { 3825 /* Values 3826 1 - recording 3827 2 - important 3828 3 - all 3829 */ 3830 3831 if (++m_showUpcomingLevel == 4) 3832 m_showUpcomingLevel = 1; 3833 3834 gContext->SaveSetting("ShowUpcomingLevel", (int)m_showUpcomingLevel); 3835 ScheduleLoad(); 3836 UpdateUILists(); 3837 } 3838 else if (action == "6") // not Green button / ";" 3839 { 3840 3841 // Cycle through ( Recorded Only / Both / Upcoming Only ) 3842 3843 if (m_viewMask & PlaybackBox::VIEW_RECORDED) 3844 { 3845 if (m_viewMask & PlaybackBox::VIEW_UPCOMING) 3846 // Both -> Upcoming Only 3847 m_viewMask = m_viewMaskToggle(m_viewMask, VIEW_RECORDED); 3848 else 3849 // Recorded Only -> Both 3850 m_viewMask = m_viewMaskToggle(m_viewMask, VIEW_UPCOMING); 3851 } 3852 else 3853 { 3854 // Upcoming Only -> Recorded Only 3855 if (m_viewMask & PlaybackBox::VIEW_UPCOMING) 3856 // Turn of Upcoming view 3857 m_viewMask = m_viewMaskToggle(m_viewMask, VIEW_UPCOMING); 3858 3859 if (!(m_viewMask & PlaybackBox::VIEW_RECORDED)) 3860 // Turn on Recorded view 3861 m_viewMask = m_viewMaskToggle(m_viewMask, VIEW_RECORDED); 3862 } 3863 3864 saveViewChanges(); 3865 ScheduleLoad(); 3866 UpdateUILists(); 3867 } 3868 3758 3869 else if (action == "NEXTFAV") 3759 3870 { 3760 3871 if (GetFocusWidget() == m_groupList) … … void PlaybackBox::customEvent(QEvent *ev 3840 3951 MythEvent *me = (MythEvent *)event; 3841 3952 QString message = me->Message(); 3842 3953 3954 if (message.left(15) == "SCHEDULE_CHANGE") 3955 { 3956 3957 ScheduleLoad(); 3958 } 3843 3959 if (message.left(21) == "RECORDING_LIST_CHANGE") 3844 3960 { 3845 3961 QStringList tokens = message.simplified().split(" "); … … void PlaybackBox::customEvent(QEvent *ev 3873 3989 } 3874 3990 else 3875 3991 { 3876 m_programInfoCache.ScheduleLoad();3992 ScheduleLoad(); 3877 3993 } 3878 3994 } 3879 3995 else if (message.left(15) == "NETWORK_CONTROL") … … void PlaybackBox::customEvent(QEvent *ev 3930 4046 } 3931 4047 else if (message == "RECONNECT_SUCCESS") 3932 4048 { 3933 m_programInfoCache.ScheduleLoad();4049 ScheduleLoad(); 3934 4050 } 3935 4051 else if (message == "LOCAL_PBB_DELETE_RECORDINGS") 3936 4052 { … … void PlaybackBox::HandleRecordingRemoveE 4113 4229 VERBOSE(VB_IMPORTANT, LOC_WARN + 4114 4230 QString("Failed to remove %1:%2, reloading list") 4115 4231 .arg(chanid).arg(recstartts.toString(Qt::ISODate))); 4116 m_programInfoCache.ScheduleLoad();4232 ScheduleLoad(); 4117 4233 return; 4118 4234 } 4119 4235 -
mythtv/programs/mythfrontend/playbackbox.h
old new class PlaybackBox : public ScheduleCommo 86 86 VIEW_SEARCHES = 0x0010, 87 87 VIEW_LIVETVGRP = 0x0020, 88 88 // insert new entries above here 89 VIEW_RECORDED = 0x2000, 90 VIEW_UPCOMING = 0x4000, 89 91 VIEW_WATCHED = 0x8000 90 92 } ViewMask; 91 93 … … class PlaybackBox : public ScheduleCommo 203 205 void toggleWatchListView(bool setOn) { toggleView(VIEW_WATCHLIST, setOn); } 204 206 void toggleSearchView(bool setOn) { toggleView(VIEW_SEARCHES, setOn); } 205 207 void toggleLiveTVView(bool setOn) { toggleView(VIEW_LIVETVGRP, setOn); } 208 void toggleUpcomingView(bool setOn) { toggleView(VIEW_UPCOMING, setOn); } 206 209 void toggleWatchedView(bool setOn) { toggleView(VIEW_WATCHED, setOn); } 207 210 208 211 void setGroupFilter(const QString &newRecGroup); … … class PlaybackBox : public ScheduleCommo 259 262 void coverartLoad(void); 260 263 261 264 private: 265 void ScheduleLoad(void); 266 262 267 bool UpdateUILists(void); 263 268 void UpdateUIGroupList(const QStringList &groupPreferences); 264 269 void UpdateUIRecGroupList(void); … … class PlaybackBox : public ScheduleCommo 382 387 QString m_watchGroupName; 383 388 QString m_watchGroupLabel; 384 389 ViewMask m_viewMask; 390 int m_showUpcomingLevel; 385 391 386 392 // Popup support ////////////////////////////////////////////////////////// 387 393 // General popup support -
mythtv/programs/mythfrontend/playbackboxhelper.cpp
old new bool PBHEventHandler::event(QEvent *e) 165 165 return true; 166 166 167 167 AvailableStatusType availableStatus = asAvailable; 168 169 if (evinfo.recstatus >= rsWillRecord) 170 { 171 availableStatus = asFutureRecording; 172 } 168 173 // Note IsFileReadable() implicitly calls GetPlaybackURL 169 174 // when necessary, we rely on this. 170 if (!evinfo.IsFileReadable())175 else if (!evinfo.IsFileReadable()) 171 176 { 172 177 VERBOSE(VB_IMPORTANT, LOC_ERR + 173 178 QString("CHECK_AVAILABILITY '%1' " … … bool PBHEventHandler::event(QEvent *e) 186 191 } 187 192 188 193 QStringList list; 189 list.push_back(evinfo.MakeUniqueKey()); 190 list.push_back(evinfo.pathname); 191 MythEvent *e0 = new MythEvent("SET_PLAYBACK_URL", list); 192 QCoreApplication::postEvent(m_pbh.m_listener, e0); 194 if (availableStatus != asFutureRecording) 195 { 196 list.push_back(evinfo.MakeUniqueKey()); 197 list.push_back(evinfo.pathname); 198 MythEvent *e0 = new MythEvent("SET_PLAYBACK_URL", list); 199 QCoreApplication::postEvent(m_pbh.m_listener, e0); 200 } 193 201 194 202 list.clear(); 195 203 list.push_back(evinfo.MakeUniqueKey()); -
mythtv/programs/mythfrontend/programinfocache.cpp
old new 11 11 #include "programinfo.h" 12 12 #include "remoteutil.h" 13 13 #include "mythevent.h" 14 #include "mythverbose.h" 14 15 15 16 typedef vector<ProgramInfo*> *VPI_ptr; 16 17 static void free_vec(VPI_ptr &v) … … static void free_vec(VPI_ptr &v) 28 29 class ProgramInfoLoader : public QRunnable 29 30 { 30 31 public: 31 ProgramInfoLoader(ProgramInfoCache &c ) : m_cache(c) {}32 ProgramInfoLoader(ProgramInfoCache &c, int upcomingLevel) : m_cache(c), ul(upcomingLevel) {} 32 33 33 void run(void) { m_cache.Load( ); }34 void run(void) { m_cache.Load(ul); } 34 35 35 36 ProgramInfoCache &m_cache; 37 int ul; 36 38 }; 37 39 38 40 ProgramInfoCache::ProgramInfoCache(QObject *o) : … … ProgramInfoCache::~ProgramInfoCache() 52 54 free_vec(m_next_cache); 53 55 } 54 56 55 void ProgramInfoCache::ScheduleLoad( void)57 void ProgramInfoCache::ScheduleLoad(int upcomingLevel) 56 58 { 57 59 QMutexLocker locker(&m_lock); 58 60 if (!m_load_is_queued) … … void ProgramInfoCache::ScheduleLoad(void 60 62 m_load_is_queued = true; 61 63 m_loads_in_progress++; 62 64 QThreadPool::globalInstance()->start( 63 new ProgramInfoLoader(*this ));65 new ProgramInfoLoader(*this, upcomingLevel)); 64 66 } 65 67 } 66 68 67 void ProgramInfoCache::Load( void)69 void ProgramInfoCache::Load(int upcomingLevel) 68 70 { 69 71 QMutexLocker locker(&m_lock); 70 72 m_load_is_queued = false; … … void ProgramInfoCache::Load(void) 73 75 /**/ 74 76 // the param to RemoteGetRecordedList doesn't actually matter 75 77 // we sort the list later anyway. 76 vector<ProgramInfo*> *tmp = RemoteGetRecordedList(false );78 vector<ProgramInfo*> *tmp = RemoteGetRecordedList(false, upcomingLevel); 77 79 /**/ 78 80 locker.relock(); 79 81 … … void ProgramInfoCache::Refresh(void) 119 121 vector<ProgramInfo*>::iterator it = m_next_cache->begin(); 120 122 for (; it != m_next_cache->end(); ++it) 121 123 { 124 125 // VERBOSE(VB_GENERAL, QString("Processing %1") 126 // .arg((*it)->toString())); 127 122 128 PICKey k((*it)->chanid.toUInt(), (*it)->recstartts); 123 129 m_cache[k] = *it; 124 130 } -
mythtv/programs/mythfrontend/programinfocache.h
old new class ProgramInfoCache 27 27 ProgramInfoCache(QObject *o); 28 28 ~ProgramInfoCache(); 29 29 30 void ScheduleLoad( void);30 void ScheduleLoad(int level); 31 31 bool IsLoadInProgress(void) const; 32 32 void WaitForLoadToComplete(void) const; 33 33 … … class ProgramInfoCache 42 42 void GetOrdered(vector<ProgramInfo*> &list, bool newest_first = false); 43 43 /// \note This must only be called from the UI thread. 44 44 bool empty(void) const { return m_cache.empty(); } 45 bool size(void) const { return m_cache.size(); } 45 46 ProgramInfo *GetProgramInfo(uint chanid, const QDateTime &recstartts) const; 46 47 ProgramInfo *GetProgramInfo(const QString &piKey) const; 47 48 48 49 private: 49 void Load( void);50 void Load(int upcomingLevel); 50 51 void Clear(void); 51 52 52 53 private: -
mythtv/themes/MythCenter-wide/base.xml
old new 85 85 <color>#666666</color> 86 86 </font> 87 87 <font name="basesmall_running_selected" from="basesmallbold"> 88 <color># 00FF00</color>88 <color>#FF0000</color> 89 89 </font> 90 90 <font name="basesmall_running" from="basesmall"> 91 <color>#DD1111</color> 92 </font> 93 <font name="basesmall_future_selected" from="basesmallbold"> 94 <color>#00FF00</color> 95 </font> 96 <font name="basesmall_future" from="basesmall"> 91 97 <color>#11DD11</color> 92 98 </font> 93 99 <font name="basesmall_textedit" from="basesmall"> … … 259 265 <font state="warning">basesmall_warning</font> 260 266 <font state="normal">basesmall_normal</font> 261 267 <font state="running">basesmall_running</font> 268 <font state="future">basesmall_future</font> 262 269 <align>vcenter</align> 263 270 </textarea> 264 271 </state> … … 278 285 <font state="warning">basesmall_warning_selected</font> 279 286 <font state="normal">basesmall_normal_selected</font> 280 287 <font state="running">basesmall_running_selected</font> 288 <font state="future">basesmall_future_selected</font> 281 289 <align>vcenter</align> 282 290 </textarea> 283 291 </state> -
mythtv/themes/MythCenter-wide/recordings-ui.xml
old new 86 86 <spacing>0</spacing> 87 87 <statetype name="buttonitem"> 88 88 <state name="active"> 89 <area>0,0,100%,30</area> 90 <statetype name="status"> 91 <position>0,2</position> 92 <state name="disabled"> 93 <imagetype name="statusimage"> 94 <filename>schedule_disabled.png</filename> 95 </imagetype> 96 </state> 97 <state name="error"> 98 <imagetype name="statusimage"> 99 <filename>schedule_conflict.png</filename> 100 </imagetype> 101 </state> 102 <state name="warning"> 103 <imagetype name="statusimage"> 104 <filename>schedule_other.png</filename> 105 </imagetype> 106 </state> 107 <!-- <state name="normal"> 108 <imagetype name="statusimage"> 109 <filename>schedule_record.png</filename> 110 </imagetype> 111 </state> --> 112 <state name="running"> 113 <imagetype name="statusimage"> 114 <filename>schedule_recording.png</filename> 115 </imagetype> 116 </state> 117 <state name="marked"></state> 118 </statetype> 89 <area>0,0,100%,30</area> 90 <statetype name="status"> 91 <position>0,2</position> 92 <state name="disabled"> 93 <imagetype name="statusimage"> 94 <filename>schedule_disabled.png</filename> 95 </imagetype> 96 </state> 97 <state name="error"> 98 <imagetype name="statusimage"> 99 <filename>schedule_conflict.png</filename> 100 </imagetype> 101 </state> 102 <state name="warning"> 103 <imagetype name="statusimage"> 104 <filename>schedule_other.png</filename> 105 </imagetype> 106 </state> 107 <state name="future"> 108 <imagetype name="statusimage"> 109 <filename>schedule_other.png</filename> 110 </imagetype> 111 </state> 112 <!-- <state name="normal"> 113 <imagetype name="statusimage"> 114 <filename>schedule_record.png</filename> 115 </imagetype> 116 </state> --> 117 <state name="running"> 118 <imagetype name="statusimage"> 119 <filename>schedule_recording.png</filename> 120 </imagetype> 121 </state> 122 <state name="marked"></state> 123 </statetype> 119 124 <textarea name="titlesubtitle" from="buttontext"> 120 125 <area>32,2,656,28</area> 121 126 <align>vcenter</align> … … 147 152 <state name="no" /> 148 153 </statetype> 149 154 </state> 150 <state name="selectedinactive" from="active" /> 155 <state name="selectedinactive" from="active"> 156 <textarea name="titlesubtitle" from="buttontext"> 157 <area>32,2,656,28</area> 158 <font>basesmall_normal</font> 159 <font state="disabled">basesmall_disabled</font> 160 <font state="error">basesmall_error</font> 161 <font state="warning">basesmall_warning</font> 162 <font state="normal">basesmall_normal</font> 163 <font state="running">basesmall_running</font> 164 <font state="future">basesmall_future</font> 165 <align>vcenter</align> 166 </textarea> 167 <textarea name="shortdate" from="titlesubtitle"> 168 <area>634,2,120,28</area> 169 <align>right,vcenter</align> 170 </textarea> 171 <textarea name="starttime" from="shortdate"> 172 <area>760,2,114,28</area> 173 <align>right,vcenter</align> 174 </textarea> 175 </state> 151 176 <state name="selectedactive" from="active"> 152 177 <shape name="selectbar"> 153 178 <area>26,0,854,30</area> … … 160 185 <font state="warning">basesmall_warning_selected</font> 161 186 <font state="normal">basesmall_normal_selected</font> 162 187 <font state="running">basesmall_running_selected</font> 188 <font state="future">basesmall_future_selected</font> 163 189 <align>vcenter</align> 164 190 </textarea> 165 191 <textarea name="shortdate" from="titlesubtitle"> … … 487 513 <font state="warning">basesmall_warning_selected</font> 488 514 <font state="normal">basesmall_normal_selected</font> 489 515 <font state="running">basesmall_running_selected</font> 516 <font state="future">basesmall_future_selected</font> 490 517 <align>vcenter</align> 491 518 </textarea> 492 519 <textarea name="shortdate" from="titlesubtitle">