Ticket #6813: 128-UpcomingMediaLibrary.w178.patch

File 128-UpcomingMediaLibrary.w178.patch, 30.5 KB (added by Bill <billstuff2001@…>, 14 years ago)
  • mythtv/libs/libmyth/programinfo.h

    old new enum AvailableStatusType { 
    192192    asPendingDelete,
    193193    asFileNotFound,
    194194    asZeroByte,
    195     asDeleted
     195    asDeleted,
     196    asFutureRecording
    196197};
    197198
    198199enum WatchListStatus {
  • mythtv/libs/libmyth/remoteutil.cpp

    old new  
    1111#include "storagegroup.h"
    1212#include "mythevent.h"
    1313
    14 vector<ProgramInfo *> *RemoteGetRecordedList(bool deltype)
     14vector<ProgramInfo *> *RemoteGetRecordedList(bool deltype, int upcomingLevel)
    1515{
    1616    QString str = "QUERY_RECORDINGS ";
    1717    if (deltype)
    vector<ProgramInfo *> *RemoteGetRecorded 
    2323
    2424    vector<ProgramInfo *> *info = new vector<ProgramInfo *>;
    2525
    26     if (!RemoteGetRecordingList(info, strlist))
     26    if (!RemoteGetRecordingList(info, strlist, upcomingLevel))
    2727    {
    2828        delete info;
    2929        return NULL;
    3030    }
     31
     32//    VERBOSE(VB_GENERAL, QString("Got %1 items for upcomingLevel %2")
     33//             .arg(info->size()).arg(upcomingLevel));
    3134 
    3235    return info;
    3336}
    void RemoteGetAllExpiringRecordings(vect 
    191194    RemoteGetRecordingList(&expiringlist, strList);
    192195}
    193196
    194 int RemoteGetRecordingList(vector<ProgramInfo *> *reclist, QStringList &strList)
     197int RemoteGetRecordingList(vector<ProgramInfo *> *reclist, QStringList &strList, int upcomingLevel)
    195198{
    196199    if (!gContext->SendReceiveStringList(strList))
    197200        return 0;
    int RemoteGetRecordingList(vector<Progra 
    215218        }
    216219    }
    217220
    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;
    219259}
    220260
    221261vector<ProgramInfo *> *RemoteGetConflictList(const ProgramInfo *pginfo)
  • mythtv/libs/libmyth/remoteutil.h

    old new class MPUBLIC FileSystemInfo 
    3030    int weight;
    3131};
    3232
    33 MPUBLIC vector<ProgramInfo *> *RemoteGetRecordedList(bool deltype);
     33MPUBLIC vector<ProgramInfo *> *RemoteGetRecordedList(bool deltype, int upcomingLevel = 0);
    3434MPUBLIC vector<FileSystemInfo> RemoteGetFreeSpace(void);
    3535MPUBLIC bool RemoteGetLoad(float load[3]);
    3636MPUBLIC bool RemoteGetUptime(time_t &uptime);
    void RemoteGetAllScheduledRecordings(vec 
    4747MPUBLIC
    4848void RemoteGetAllExpiringRecordings(vector<ProgramInfo *> &expiringlist);
    4949MPUBLIC int RemoteGetRecordingList(vector<ProgramInfo *> *reclist,
    50                                    QStringList &strList);
     50                                   QStringList &strList, int upcomingLevel = 0);
    5151MPUBLIC vector<ProgramInfo *> *RemoteGetConflictList(const ProgramInfo *pginfo);
    5252MPUBLIC void RemoteSendMessage(const QString &message);
    5353MPUBLIC void RemoteSendEvent(const MythEvent &event);
  • mythtv/programs/mythfrontend/playbackbox.cpp

    old new static QString extract_main_state(const  
    267267    if (pginfo.recstatus == rsRecording)
    268268        state = "running";
    269269
    270     if (((pginfo.recstatus != rsRecording) &&
     270    if (((pginfo.recstatus < rsRecording) &&
    271271         (pginfo.availableStatus != asAvailable) &&
    272272         (pginfo.availableStatus != asNotYetAvailable)) ||
    273273        (player && player->IsSameProgram(0, &pginfo)))
    274274    {
    275275        state = "disabled";
    276276    }
     277    if (pginfo.recstatus > rsRecording)
     278        state = "future";
    277279
    278280    return state;
    279281}
    PlaybackBox::PlaybackBox(MythScreenStack 
    381383      m_watchGroupName(tr("Watch List")),
    382384      m_watchGroupLabel(m_watchGroupName.toLower()),
    383385      m_viewMask(VIEW_TITLES),
     386      m_showUpcomingLevel(1), // 1 = recording or conflicting, 2 = important (inactive), 3 = all
    384387
    385388      // General m_popupMenu support
    386389      m_popupMenu(NULL),
    PlaybackBox::PlaybackBox(MythScreenStack 
    421424                                    "DisplayGroupDefaultViewMask",
    422425                                    VIEW_TITLES | VIEW_WATCHED);
    423426
     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
    424434    // Translate these external settings into mask values
    425435    if (gContext->GetNumSetting("PlaybackWatchList", 1) &&
    426436        !(m_viewMask & VIEW_WATCHLIST))
    bool PlaybackBox::Create() 
    567577    }
    568578
    569579    BuildFocusList();
    570     m_programInfoCache.ScheduleLoad();
     580    ScheduleLoad();
    571581    LoadInBackground();
    572582
    573583    return true;
    574584}
    575585
     586void PlaybackBox::ScheduleLoad(void)
     587{
     588    m_programInfoCache.ScheduleLoad( (m_viewMask & PlaybackBox::VIEW_UPCOMING) ? m_showUpcomingLevel: 0);
     589}
     590
    576591void PlaybackBox::Load(void)
    577592{
    578593    m_programInfoCache.WaitForLoadToComplete();
    void PlaybackBox::UpdateUIListItem( 
    817832
    818833    item->DisplayState(rating, "ratingstate");
    819834
    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    }
    823842
    824843    if ((GetFocusWidget() == m_recordingList) && is_sel)
    825844    {
    void PlaybackBox::UpdateUIListItem( 
    842861
    843862        if (m_previewImage)
    844863        {
    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();
    847871        }
    848872
    849873        if (m_fanart || m_banner || m_coverart)
    void PlaybackBox::updateRecList(MythUIBu 
    12101234    subtitleFlags[SUB_NORMAL] = "subtitles";
    12111235    subtitleFlags[SUB_HARDHEAR] = "cc";
    12121236
     1237    MythUIButtonListItem *toSelect = NULL;
    12131238    ProgramList::iterator it = progList.begin();
    12141239    for (; it != progList.end(); ++it)
    12151240    {
    void PlaybackBox::updateRecList(MythUIBu 
    12201245        MythUIButtonListItem *item =
    12211246            new PlaybackBoxListItem(this, m_recordingList, *it);
    12221247
     1248        if ( toSelect == NULL && (*it)->recstatus < rsWillRecord)
     1249            toSelect = item;
     1250
    12231251        QString state = extract_main_state(**it, m_player);
    12241252
    12251253        item->SetFontState(state);
    void PlaybackBox::updateRecList(MythUIBu 
    12771305        }
    12781306    }
    12791307
     1308    if (toSelect)
     1309        m_recordingList->SetItemCurrent(toSelect);
     1310
    12801311    if (m_noRecordingsText)
    12811312    {
    12821313        if (!progList.empty())
    static bool save_position( 
    12971328    QStringList &groupSelPref, QStringList &itemSelPref,
    12981329    QStringList &itemTopPref)
    12991330{
     1331    VERBOSE(VB_GENERAL, QString("Saving rlcount = %1").arg(recordingList->GetCount()));
    13001332    MythUIButtonListItem *prefSelGroup = groupList->GetItemCurrent();
    13011333    if (!prefSelGroup)
    13021334        return false;
    13031335
     1336    VERBOSE(VB_GENERAL, QString("Saving 1 prefSelGroup '%1'").arg(prefSelGroup->GetData().toString()));
    13041337    groupSelPref.push_back(prefSelGroup->GetData().toString());
    13051338    for (int i = groupList->GetCurrentPos();
    13061339         i < groupList->GetCount(); i++)
    static bool save_position( 
    13111344    }
    13121345
    13131346    int curPos = recordingList->GetCurrentPos();
     1347    VERBOSE(VB_GENERAL, QString("Saving 2 curPos %1").arg(curPos));
    13141348    for (int i = curPos; (i >= 0) && (i < recordingList->GetCount()); i++)
    13151349    {
    13161350        MythUIButtonListItem *item = recordingList->GetItemAt(i);
    static bool save_position( 
    13271361    }
    13281362
    13291363    int topPos = recordingList->GetTopItemPos();
     1364    VERBOSE(VB_GENERAL, QString("Saving 3 topPos %1").arg(topPos));
    13301365    for (int i = topPos + 1; i >= topPos - 1; i--)
    13311366    {
    13321367        if (i >= 0 && i < recordingList->GetCount())
    static bool save_position( 
    13461381        }
    13471382    }
    13481383
     1384    VERBOSE(VB_GENERAL, "Saving done");
    13491385    return true;
    13501386}
    13511387
    static void restore_position( 
    13541390    const QStringList &groupSelPref, const QStringList &itemSelPref,
    13551391    const QStringList &itemTopPref)
    13561392{
     1393    VERBOSE(VB_GENERAL, QString("Trying to restore"));
    13571394    // If possible reselect the item selected before,
    13581395    // otherwise select the nearest available item.
    13591396    MythUIButtonListItem *prefSelGroup = groupList->GetItemCurrent();
    static void restore_position( 
    13661403
    13671404    // the group is selected in UpdateUIGroupList()
    13681405    QString groupname = prefSelGroup->GetData().toString();
     1406    VERBOSE(VB_GENERAL, QString("Trying to restore groupname = '%1'").arg(groupname));
    13691407
    13701408    // find best selection
    13711409    int sel = -1;
     1410
     1411    VERBOSE(VB_GENERAL, QString("Trying to restore itemSelPref.size() = %1").arg((uint)itemSelPref.size()));
    13721412    for (uint i = 0; i+1 < (uint)itemSelPref.size(); i+=2)
    13731413    {
    13741414        if (itemSelPref[i] != groupname)
    static void restore_position( 
    13901430
    13911431    // find best top item
    13921432    int top = -1;
     1433    VERBOSE(VB_GENERAL, QString("Trying to restore itemTopPref.size() = %1").arg((uint)itemTopPref.size()));
    13931434    for (uint i = 0; i+1 < (uint)itemTopPref.size(); i+=2)
    13941435    {
    13951436        if (itemTopPref[i] != groupname)
    static void restore_position( 
    14111452
    14121453    if (sel >= 0)
    14131454    {
    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));
    14161457        recordingList->SetItemCurrent(sel, top);
    14171458    }
    14181459    else
    14191460    {
    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));
    14221463    }
    14231464}
    14241465
    bool PlaybackBox::UpdateUILists(void) 
    14981539        vector<ProgramInfo*> list;
    14991540        bool newest_first = (0==m_allOrder) || (kDeleteBox==m_type);
    15001541        m_programInfoCache.GetOrdered(list, newest_first);
     1542
     1543        VERBOSE(VB_GENERAL, QString("Got %1 items in list from m_programInfoCache").arg(list.size()));
     1544
    15011545        vector<ProgramInfo*>::const_iterator it = list.begin();
    15021546        for ( ; it != list.end(); ++it)
    15031547        {
    bool PlaybackBox::UpdateUILists(void) 
    15281572                    (p->programflags & FL_WATCHED))
    15291573                    continue;
    15301574
     1575                if ((! (m_viewMask & VIEW_RECORDED)) &&
     1576                    p->recstatus < rsWillRecord)
     1577                    continue;
     1578
    15311579                if (m_viewMask != VIEW_NONE &&
    15321580                    (p->recgroup != "LiveTV" || m_recGroup == "LiveTV"))
    15331581                    m_progLists[""].push_front(p);
    void PlaybackBox::deleteSelected(MythUIB 
    20132061    if (!pginfo)
    20142062        return;
    20152063
     2064    if (pginfo->recstatus >= rsWillRecord)
     2065    {
     2066        EditRecording(pginfo);
     2067        UpdateUILists();
     2068        return;
     2069    }
     2070
    20162071    bool undelete_possible =
    20172072            gContext->GetNumSetting("AutoExpireInsteadOfDelete", 0);
    20182073
    bool PlaybackBox::Play(const ProgramInfo 
    21822237    if (m_player)
    21832238        return true;
    21842239
     2240    if (asFutureRecording == rec.availableStatus || rec.recstatus >= rsWillRecord)
     2241    {
     2242        ProgramInfo *tmppi = CurrentItem();
     2243        EditRecording(tmppi);
     2244
     2245        UpdateUILists();
     2246        return false;
     2247    }
     2248
    21852249    if ((asAvailable != rec.availableStatus) || (0 == rec.filesize) ||
    21862250        (rec.GetRecordBasename() == rec.pathname))
    21872251    {
    bool PlaybackBox::keyPressEvent(QKeyEven 
    37553819                     ShowGroupPopup();
    37563820             }
    37573821        }
     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
    37583869        else if (action == "NEXTFAV")
    37593870        {
    37603871            if (GetFocusWidget() == m_groupList)
    void PlaybackBox::customEvent(QEvent *ev 
    38403951        MythEvent *me = (MythEvent *)event;
    38413952        QString message = me->Message();
    38423953
     3954        if (message.left(15) == "SCHEDULE_CHANGE")
     3955        {
     3956
     3957            ScheduleLoad();
     3958        }
    38433959        if (message.left(21) == "RECORDING_LIST_CHANGE")
    38443960        {
    38453961            QStringList tokens = message.simplified().split(" ");
    void PlaybackBox::customEvent(QEvent *ev 
    38733989            }
    38743990            else
    38753991            {
    3876                 m_programInfoCache.ScheduleLoad();
     3992                ScheduleLoad();
    38773993            }
    38783994        }
    38793995        else if (message.left(15) == "NETWORK_CONTROL")
    void PlaybackBox::customEvent(QEvent *ev 
    39304046        }
    39314047        else if (message == "RECONNECT_SUCCESS")
    39324048        {
    3933             m_programInfoCache.ScheduleLoad();
     4049            ScheduleLoad();
    39344050        }
    39354051        else if (message == "LOCAL_PBB_DELETE_RECORDINGS")
    39364052        {
    void PlaybackBox::HandleRecordingRemoveE 
    41134229        VERBOSE(VB_IMPORTANT, LOC_WARN +
    41144230                QString("Failed to remove %1:%2, reloading list")
    41154231                .arg(chanid).arg(recstartts.toString(Qt::ISODate)));
    4116         m_programInfoCache.ScheduleLoad();
     4232        ScheduleLoad();
    41174233        return;
    41184234    }
    41194235
  • mythtv/programs/mythfrontend/playbackbox.h

    old new class PlaybackBox : public ScheduleCommo 
    8686        VIEW_SEARCHES   =  0x0010,
    8787        VIEW_LIVETVGRP  =  0x0020,
    8888        // insert new entries above here
     89        VIEW_RECORDED   =  0x2000,
     90        VIEW_UPCOMING   =  0x4000,
    8991        VIEW_WATCHED    =  0x8000
    9092    } ViewMask;
    9193
    class PlaybackBox : public ScheduleCommo 
    203205    void toggleWatchListView(bool setOn) { toggleView(VIEW_WATCHLIST, setOn); }
    204206    void toggleSearchView(bool setOn)    { toggleView(VIEW_SEARCHES, setOn); }
    205207    void toggleLiveTVView(bool setOn)    { toggleView(VIEW_LIVETVGRP, setOn); }
     208    void toggleUpcomingView(bool setOn)   { toggleView(VIEW_UPCOMING, setOn); }
    206209    void toggleWatchedView(bool setOn)   { toggleView(VIEW_WATCHED, setOn); }
    207210
    208211    void setGroupFilter(const QString &newRecGroup);
    class PlaybackBox : public ScheduleCommo 
    259262    void coverartLoad(void);
    260263
    261264  private:
     265    void ScheduleLoad(void);
     266
    262267    bool UpdateUILists(void);
    263268    void UpdateUIGroupList(const QStringList &groupPreferences);
    264269    void UpdateUIRecGroupList(void);
    class PlaybackBox : public ScheduleCommo 
    382387    QString             m_watchGroupName;
    383388    QString             m_watchGroupLabel;
    384389    ViewMask            m_viewMask;
     390    int                 m_showUpcomingLevel;
    385391
    386392    // Popup support //////////////////////////////////////////////////////////
    387393    // General popup support
  • mythtv/programs/mythfrontend/playbackboxhelper.cpp

    old new bool PBHEventHandler::event(QEvent *e) 
    165165                return true;
    166166
    167167            AvailableStatusType availableStatus = asAvailable;
     168
     169            if (evinfo.recstatus >= rsWillRecord)
     170            {
     171                availableStatus = asFutureRecording;
     172            }
    168173            // Note IsFileReadable() implicitly calls GetPlaybackURL
    169174            // when necessary, we rely on this.
    170             if (!evinfo.IsFileReadable())
     175            else if (!evinfo.IsFileReadable())
    171176            {
    172177                VERBOSE(VB_IMPORTANT, LOC_ERR +
    173178                        QString("CHECK_AVAILABILITY '%1' "
    bool PBHEventHandler::event(QEvent *e) 
    186191            }
    187192
    188193            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            }
    193201
    194202            list.clear();
    195203            list.push_back(evinfo.MakeUniqueKey());
  • mythtv/programs/mythfrontend/programinfocache.cpp

    old new  
    1111#include "programinfo.h"
    1212#include "remoteutil.h"
    1313#include "mythevent.h"
     14#include "mythverbose.h"
    1415
    1516typedef vector<ProgramInfo*> *VPI_ptr;
    1617static void free_vec(VPI_ptr &v)
    static void free_vec(VPI_ptr &v) 
    2829class ProgramInfoLoader : public QRunnable
    2930{
    3031  public:
    31     ProgramInfoLoader(ProgramInfoCache &c) : m_cache(c) {}
     32    ProgramInfoLoader(ProgramInfoCache &c, int upcomingLevel) : m_cache(c), ul(upcomingLevel) {}
    3233
    33     void run(void) { m_cache.Load(); }
     34    void run(void) { m_cache.Load(ul); }
    3435
    3536    ProgramInfoCache &m_cache;
     37    int ul;
    3638};
    3739
    3840ProgramInfoCache::ProgramInfoCache(QObject *o) :
    ProgramInfoCache::~ProgramInfoCache() 
    5254    free_vec(m_next_cache);
    5355}
    5456
    55 void ProgramInfoCache::ScheduleLoad(void)
     57void ProgramInfoCache::ScheduleLoad(int upcomingLevel)
    5658{
    5759    QMutexLocker locker(&m_lock);
    5860    if (!m_load_is_queued)
    void ProgramInfoCache::ScheduleLoad(void 
    6062        m_load_is_queued = true;
    6163        m_loads_in_progress++;
    6264        QThreadPool::globalInstance()->start(
    63             new ProgramInfoLoader(*this));
     65            new ProgramInfoLoader(*this, upcomingLevel));
    6466    }
    6567}
    6668
    67 void ProgramInfoCache::Load(void)
     69void ProgramInfoCache::Load(int upcomingLevel)
    6870{
    6971    QMutexLocker locker(&m_lock);
    7072    m_load_is_queued = false;
    void ProgramInfoCache::Load(void) 
    7375    /**/
    7476    // the param to RemoteGetRecordedList doesn't actually matter
    7577    // we sort the list later anyway.
    76     vector<ProgramInfo*> *tmp = RemoteGetRecordedList(false);
     78    vector<ProgramInfo*> *tmp = RemoteGetRecordedList(false, upcomingLevel);
    7779    /**/
    7880    locker.relock();
    7981
    void ProgramInfoCache::Refresh(void) 
    119121        vector<ProgramInfo*>::iterator it = m_next_cache->begin();
    120122        for (; it != m_next_cache->end(); ++it)
    121123        {
     124
     125//            VERBOSE(VB_GENERAL, QString("Processing %1")
     126//                     .arg((*it)->toString()));
     127
    122128            PICKey k((*it)->chanid.toUInt(), (*it)->recstartts);
    123129            m_cache[k] = *it;
    124130        }
  • mythtv/programs/mythfrontend/programinfocache.h

    old new class ProgramInfoCache 
    2727    ProgramInfoCache(QObject *o);
    2828    ~ProgramInfoCache();
    2929
    30     void ScheduleLoad(void);
     30    void ScheduleLoad(int level);
    3131    bool IsLoadInProgress(void) const;
    3232    void WaitForLoadToComplete(void) const;
    3333
    class ProgramInfoCache 
    4242    void GetOrdered(vector<ProgramInfo*> &list, bool newest_first = false);
    4343    /// \note This must only be called from the UI thread.
    4444    bool empty(void) const { return m_cache.empty(); }
     45    bool size(void) const { return m_cache.size(); }
    4546    ProgramInfo *GetProgramInfo(uint chanid, const QDateTime &recstartts) const;
    4647    ProgramInfo *GetProgramInfo(const QString &piKey) const;
    4748
    4849  private:
    49     void Load(void);
     50    void Load(int upcomingLevel);
    5051    void Clear(void);
    5152
    5253  private:
  • mythtv/themes/MythCenter-wide/base.xml

    old new  
    8585        <color>#666666</color>
    8686    </font>
    8787    <font name="basesmall_running_selected" from="basesmallbold">
    88         <color>#00FF00</color>
     88        <color>#FF0000</color>
    8989    </font>
    9090    <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">
    9197        <color>#11DD11</color>
    9298    </font>
    9399    <font name="basesmall_textedit" from="basesmall">
     
    259265                    <font state="warning">basesmall_warning</font>
    260266                    <font state="normal">basesmall_normal</font>
    261267                    <font state="running">basesmall_running</font>
     268                    <font state="future">basesmall_future</font>
    262269                    <align>vcenter</align>
    263270                </textarea>
    264271            </state>
     
    278285                    <font state="warning">basesmall_warning_selected</font>
    279286                    <font state="normal">basesmall_normal_selected</font>
    280287                    <font state="running">basesmall_running_selected</font>
     288                    <font state="future">basesmall_future_selected</font>
    281289                    <align>vcenter</align>
    282290                </textarea>
    283291            </state>
  • mythtv/themes/MythCenter-wide/recordings-ui.xml

    old new  
    8686            <spacing>0</spacing>
    8787            <statetype name="buttonitem">
    8888                <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>
    119124                    <textarea name="titlesubtitle" from="buttontext">
    120125                        <area>32,2,656,28</area>
    121126                        <align>vcenter</align>
     
    147152                        <state name="no" />
    148153                    </statetype>
    149154                </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>
    151176                <state name="selectedactive" from="active">
    152177                    <shape name="selectbar">
    153178                        <area>26,0,854,30</area>
     
    160185                        <font state="warning">basesmall_warning_selected</font>
    161186                        <font state="normal">basesmall_normal_selected</font>
    162187                        <font state="running">basesmall_running_selected</font>
     188                        <font state="future">basesmall_future_selected</font>
    163189                        <align>vcenter</align>
    164190                    </textarea>
    165191                    <textarea name="shortdate" from="titlesubtitle">
     
    487513                        <font state="warning">basesmall_warning_selected</font>
    488514                        <font state="normal">basesmall_normal_selected</font>
    489515                        <font state="running">basesmall_running_selected</font>
     516                        <font state="future">basesmall_future_selected</font>
    490517                        <align>vcenter</align>
    491518                    </textarea>
    492519                    <textarea name="shortdate" from="titlesubtitle">