[mythtv] Missed recordings caused by EIT guide update

David Engel david at istwok.net
Sun Sep 1 18:04:24 UTC 2019


On Thu, Aug 29, 2019 at 09:52:17PM +0200, Klaas de Waal wrote:
> As discussed, the problem of missed single recordings is caused by the starttime
> of programs being changed by the guide updates from the EIT.

Klaas, I think I have a better idea for you.  In
Scheduler::AddNotListed(), the scheduler identifies single and
override rules that no longer match program in the guide.  It should
probably include don't record rules too but that's a separate issue.

I suggest you hook into AddNotListed() and if a not listed rule is
found, then attempt to see if the program has moved slightly in time.
If a program has moved, update the recording rule according and
initiate a reschedule.

Ideally this should only be done the first time a not listed rule is
found.  It would be wasteful to keep looking for a slightly moved
program when one doesn't exist.  I'm not sure how easy that would be
to do but it should be the goal.

David

> I am now testing a fix that does the following.
> In addition to updating the starttime in database table program (and in the
> associated tables credits, programrating and programgenres) the starttime
> is now also updated in table record when the program is present there.
> 
> However, there may be a better solution possible.
> The underlying problem, as I understand it, is that the programs, i.e.
> the records in table program, can only be identified by the fields
> chanid plus starttime. This means there is no way to identify a
> program when the starttime of the program can have been changed.
> 
> It is possible to give tables a separate field to be used as the
> primary key, independent of the content of the rest of the record.
> This is done in table record which has field recordid as primary key.
> Same for table capturecard with primary key cardid.
> 
> If the table program would also have a independent primary key then it
> would be possible to refer to programs (records in table program) using
> that key instead of using the starttime. This then makes it possible to
> have a reference to a program in which all fields including the starttime
> can be changed.
> 
> The advantage of the fix currently being tested is that it does not require
> a change in the database schema and that it comprises only a few lines of code.
> Nevertheless, when and if there is a database schema change forthcoming it might
> be a good moment to add a field programidx to table program and to all
> other tables that contain references to table program so that the code
> can be cleaned up.
> 
> Or maybe there is a very good reason why not to use a separate primary
> key but use startttime pluls chanid instead. Performance?
> 
> Comments are very much appreciated. In the meantime I keep on testing the fix!
> 
> Cheers,
> Klaas.
> 
> N.B. There is a field programid in table program but that is used
> for other purposes so that fieldname cannot be used for the primary index.
> 
> N.B. The code in programdata.cpp that does the updates is used by
> mythfilldatabase as well as far as I know so anything that works with the
> guide updates from EIT  should work for mythfilldatabase as well.
> 
> N.B. There is no field manualid in table record so I assume the manual records
> are dealt with in another place.
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list