Ticket #2335: ticket-2335.diff

File ticket-2335.diff, 974 bytes (added by tino.keitel+mythtv@…, 17 years ago)

create a new show every 2 minutes to reproduce the problem quickly

  • mythtv/libs/libmythtv/programinfo.cpp

    a b ProgramInfo *ProgramInfo::GetProgramAtDa 
    731731        return p;
    732732
    733733    // Round endtime up to the next half-hour.
    734     if (p->endts.time().minute() < 30)
    735         p->endts.setTime(QTime(p->endts.time().hour(), 30));
    736     else
    737     {
    738         if (p->endts.time().hour() == 23)
    739         {
    740             p->endts = p->endts.addDays(1);
    741             p->endts.setTime(QTime(0, 0));
    742         }
    743         else
    744             p->endts.setTime(QTime(p->endts.time().hour() + 1, 0));
    745     }
     734    p->endts.setTime(QTime(p->endts.time().hour(), (p->endts.time().minute() / 2) * 2));
     735    p->endts = p->endts.addSecs(2 * 60);
    746736
    747737    // if under a minute, bump it up to the next half hour
    748738    if (p->startts.secsTo(p->endts) < 60)
    749         p->endts = p->endts.addSecs(30 * 60);
     739        p->endts = p->endts.addSecs(2 * 60);
    750740
    751741    p->recendts = p->endts;
    752742