Ticket #8819: SchedulerDistinct.patch

File SchedulerDistinct.patch, 983 bytes (added by Rob Smith, 9 years ago)
  • programs/mythbackend/scheduler.cpp

     
    33033303    progfindid.replace("program.","p.");
    33043304    progfindid.replace("channel.","c.");
    33053305    QString query = QString(
    3306         "SELECT DISTINCT "
     3306        "SELECT "
    33073307        "    c.chanid,         c.sourceid,           p.starttime,       "// 0-2
    33083308        "    p.endtime,        p.title,              p.subtitle,        "// 3-5
    33093309        "    p.description,    c.channum,            c.callsign,        "// 6-8
     
    33413341        "     oldrecstatus.starttime = p.starttime AND "
    33423342        "     oldrecstatus.title     = p.title ) "
    33433343        "WHERE p.endtime >= NOW() - INTERVAL 1 DAY "
     3344        "GROUP BY c.sourceid, c.chanid, p.starttime "
    33443345        "ORDER BY RECTABLE.recordid DESC ");
    33453346    query.replace("RECTABLE", schedTmpRecord);
    33463347