[mythtv] [patch] mythfill: pginfo->start > pginfo->end
Andrew M. Bishop
amb at gedanken.demon.co.uk
Thu Jul 1 14:19:04 EDT 2004
Kenneth Aafl=F8y <ke-aa at frisurf.no> writes:
> On Monday 28 June 2004 20:17, Andrew M. Bishop wrote:
> > Kenneth Aafl=3DF8y <ke-aa at frisurf.no> writes:
> > > [snip]
> > > > - Andrew Bishop: apply picture settings for non-tuneable channels
> > > > (composite/svid), ignore programs where start time > end time in
> > > > listings.
> > > [snip]
> > >
> > > Ignore programs start > end breaks for me because fixPrograms is run
> > > after this code, and the attached patch fixes it.
> >
> > Did you see my later patch to replace the one that is referred to by
> > the above cvs change?
> [snip]
> > I haven't seen any sign that my second patch has been applied yet
> > though.
>
> Sorry, I assumed that all patches had been applied to CVS, since this commit
> was done way back, and I did'nt think of checking. I found it in my archive
> though, and I'm sure it was meant to be committed, but overlooked.
> Could you resubmit it as an attachment for completness?
For completeness and the benefit of Isaac in case he missed the first
patch.
-------------- next part --------------
--- /home/amb/mythtv/v0.15.1/mythtv/programs/mythfilldatabase/filldata.orig.cpp 2004-06-06 09:20:15.000000000 +0100
+++ /home/amb/mythtv/v0.15.1/mythtv/programs/mythfilldatabase/filldata.cpp 2004-06-18 11:16:17.000000000 +0100
@@ -1443,13 +1443,6 @@
if (!pginfo->desc.isEmpty())
groupingDesc = pginfo->desc + " : ";
}
- else if (pginfo->startts > pginfo->endts)
- {
- cerr << "invalid program (start > end): "
- << pginfo->channel << " "
- << pginfo->title.local8Bit() << " "
- << pginfo->startts << "-" << pginfo->endts << endl;
- }
else
{
if (pginfo->clumpidx.isEmpty())
@@ -1527,7 +1520,7 @@
cur = i;
i++;
// fill in miss stop times
- if ((*cur).endts == "")
+ if ((*cur).endts == "" || (*cur).startts > (*cur).endts)
{
if (i != fixlist->end())
{
@@ -1537,8 +1530,16 @@
else
{
(*cur).end = (*cur).start;
- (*cur).end.setTime(QTime(0, 0));
- (*cur).end.setDate((*cur).end.date().addDays(1));
+
+ if ((*cur).end < QDateTime((*cur).end.date(),QTime(6, 0)))
+ {
+ (*cur).end.setTime(QTime(6, 0));
+ }
+ else
+ {
+ (*cur).end.setTime(QTime(0, 0));
+ (*cur).end.setDate((*cur).end.date().addDays(1));
+ }
(*cur).endts = (*cur).end.toString("yyyyMMddhhmmss").ascii();
}
-------------- next part --------------
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop amb at gedanken.demon.co.uk
http://www.gedanken.demon.co.uk/
More information about the mythtv-dev
mailing list