Ticket #13421: 20190306_1851_tickets_13397_13421.patch

File 20190306_1851_tickets_13397_13421.patch, 1.2 KB (added by Peter Bennett, 17 months ago)

This fixes two tickets #13397 & #13421

  • mythtv/programs/mythfrontend/prevreclist.cpp

    diff --git a/mythtv/programs/mythfrontend/prevreclist.cpp b/mythtv/programs/mythfrontend/prevreclist.cpp
    index 698d5c74157..e6ca103069e 100644
    a b bool PrevRecordedList::LoadTitles(void) 
    236236
    237237bool PrevRecordedList::LoadDates(void)
    238238{
    239     QString querystr = "SELECT DISTINCT YEAR(starttime), MONTH(starttime) "
     239    QString querystr = "SELECT DISTINCT "
     240            "YEAR(CONVERT_TZ(starttime,'UTC','SYSTEM')), "
     241            "MONTH(CONVERT_TZ(starttime,'UTC','SYSTEM')) "
    240242        "FROM oldrecorded "
    241243        "WHERE oldrecorded.future = 0 " + m_where;
    242244
    void PrevRecordedList::LoadShowsByTitle(void) 
    404406    MSqlBindings bindings;
    405407    QString sql = " AND oldrecorded.title = :TITLE " + m_where;
    406408    int selected = m_titleList->GetCurrentPos();
    407     bindings[":TITLE"] = m_titleData[selected]->GetTitle();
     409    if (m_titleData[selected])
     410        bindings[":TITLE"] = m_titleData[selected]->GetTitle();
     411    else
     412        bindings[":TITLE"] = "";
    408413    if (!m_title.isEmpty())
    409414        bindings[":MTITLE"] = m_title;
    410415    m_showData.clear();