[mythtv-users] debugging duplicate recordings

Joey Morris rjmorris.list at zoho.com
Fri Aug 21 12:13:01 UTC 2015


Roger Siddons <dizygotheca at ntlworld.com> wrote on Fri, Aug 21, 2015 at 11:40:52AM +0100:
> On Thu, 20 Aug 2015 02:40:29 +0100, Joey Morris <rjmorris.list at zoho.com>
> wrote:
> 
> >
> >Does anyone have thoughts about why Myth is recording these episodestwice
> >or
> >advice for further troubleshooting?
> >
> 
> Firstly I'd check the backend log to confirm there's no database errors
> (crashed tables).

My logging hasn't worked since I switched to systemd a few weeks ago. Fixing
that is a task for another day. optimize_db.pl doesn't report any crashes,
though.

> Then you can check the scheduler's intentions:
> 
> mythbackend --printsched
> 
> https://www.mythtv.org/wiki/Mythbackend#Interpreting_--printsched_Output

That looks like what I'd expect based on what I see in Upcoming Recordings.

> And correlate it to the database
> 
> using either SQL
> 
> SELECT * FROM oldrecorded WHERE title LIKE "%Mayberry%";
> SELECT * FROM recorded WHERE title LIKE "%Mayberry%";
> 
> or interactively via Adminer  http://www.adminer.org
> 
> https://www.mythtv.org/wiki/Oldrecorded_table
> https://www.mythtv.org/wiki/Recorded_table
> 
> That might explain what's going on.

The table descriptions in the wiki gave me a piece of info that helped me find
the explanation. I had seen the duplicate field in the database before but
didn't know what it meant and dismissed it because its values weren't consistent
across my episode pairs. (Sometimes it's 1 for both entries of the same episode,
sometimes it's 0 for both, and sometimes it's 0 for one and 1 for the other.)

According to the wiki, duplicate=0 means the show may be re-recorded. That led
me to play with the Duplicate Matching setting in the recording rule. It had
been set to "Don't match duplicates". After I changed it to "Match duplicates
using subtitle & description", the scheduler marks the future duplicates as
"Previously recorded" and won't record them.

Here's where I'm still confused. Is Myth now deciding these are duplicates
because the subtitles and descriptions match? It shouldn't fall back to the
subtitles and descriptions, because the episodes have non-generic, matching
program IDs. Or do you have to set Duplicate Matching to something other than
"Don't match duplicates" before even the program ID check is enabled? I assume
this is the case. And OK, it sounds obvious now that I've written it out. In my
defense, however, this detail is omitted in the recording rule setting, on the
wiki page, and in Mike Dean's spiel about duplicate matching. From the wiki:

  The program ID is the definitive identifier of an episode. If the current
  episode described in the listings and a previously-recorded episode both have
  non-generic program ID's, then only the program ID will be compared to
  determine if the program is a duplicate. In this case the duplicate-matching
  method specified by the recording rule will be ignored.

I interpret the "duplicate-matching method specified by the recording rule" to
mean *any* of the choices for the duplicate matching setting, including "Don't
match duplicates". I think the setting would be much clearer if instead of these
options:

  Don't match duplicates
  Match duplicates using subtitle & description
  Match duplicates using subtitle then description
  Match duplicates using subtitle
  Match duplicates using description

The options were:

  Don't match duplicates
  Match duplicates using program ID, falling back on subtitle & description
  Match duplicates using program ID, falling back on subtitle then description
  ...

Or, if we're OK with the implied use of program ID:

  Don't match duplicates
  Match duplicates, falling back on subtitle & description
  Match duplicates, falling back on subtitle then description
  ...

Or even two separate settings, which I think is the clearest:

  [setting #1]
  Don't match duplicates
  Match duplicates

  [setting #2, disabled if setting #1 is "Don't match duplicates"]
  Use subtitle & description if missing program ID
  Use subtitle then description if missing program ID
  ...

Assuming my interpretation of how all this works is correct, I will update the
wiki to make this point more obvious.

> A Myth version might be useful too.

Yes, sorry. It's: fixes/0.27 [v0.27.5-17-gb8b831d], built from source with a few
of my own patches added (frontend-related only).

Thanks all for the assistance!



More information about the mythtv-users mailing list