[mythtv] [PATCH] optionally re-record auto-expired programs

Marcel Meier linux at meiersos.ch
Fri Apr 1 20:26:27 UTC 2005


Am Freitag, 1. April 2005 21.38 schrieb Joel Anderson:
> > > > This is a version of a patch that I've been applying to mythtv since
> > > > 0.11.  It adds an option in the Mythfrontend/Setup/TV/General settings
> > > > which causes the backend to delete the oldrecorded entry for any show
> > > > which is auto-expired due to lack of disk space.  (I don't think this
> > > > effects the min/max episode expiry, but perhaps it does.)  The default
> > > > is the current behavior, that is retain the oldrecorded entry.
> > > >
> > >
> > > Just poking through some code and patches trying to learn a bit about
> > > c++ and myth.  Please correct me if I'm wrong, but this feature seems
> > > to do the opposite of the checkbox in the settings.
> > >
> > > I believe
> > >                if (gContext->GetSetting("RerecordAutoExpired", 0))
> > > should be
> > >                if (gContext->GetSetting("RerecordAutoExpired", 1))
> > >
> > > Sorry if I'm wrong, still early in the learning curve.  :)
> > >
> > > Regards,
> > > --
> > > Joel
> > >
> > 
> > Sorry, I stupidly jumped the gun on that one.  I now tested it like this:
> > 
> >                if (!gContext->GetSetting("RerecordAutoExpired", 0))
> > 
> > and it now for me it does as the checkbox in the settings screen states.
> > 
> > I can do a diff against cvs and send it if that is required.
> 
> Sorry for all the reply-to-myself, but I believe I have finally figured it out.
> 
> The original patch (I'm working from 0.16 btw) behavior ignores the
> setting in the database and removes the autoexpired show from the
> oldrecorded table regardless.
> 
> My last attempt above replaced the "always" with "never", and still
> ignored the actual setting.
> 
> So after much investigating (and learning!) it seems that the problem
> is that the returned value is a string and not numeric, so this should
> do the trick.
> 
> Change:
>                 if (gContext->GetSetting("RerecordAutoExpired", 0))
> to
>                 if (gContext->GetSetting("RerecordAutoExpired", 0) == "1")
> 
> I did test it quite thoroughly this time on my 0.16 install, but if
> someone could try it against cvs and generate a proper diff would be
> very cool.
> 
> Oh, and sorry for all the "spam", I promise to test thoroughly next
> time _before_ mailing the dev list with my ramblings.  :)
> 


If you would like to help out, I think it's best to first get the CSV HEAD of mythtv.

The autoexpire feature has changed a lot since 0.16.

just my 5 cent

Regards Marcel


More information about the mythtv-dev mailing list