[mythtv-users] Duplicate detection not working for some recordings

Philipp Hahn pmhahn+mythtv at pmhahn.de
Sun Jan 10 16:58:04 UTC 2021


Hello,

I'm trying to understand why MythTV plans to re-record an episode I 
still have.

I've read <https://www.mythtv.org/wiki/Duplicate_matching> but I cannot 
figure it out myself. (I live in Germany and I'm using 
'tv_grab_eu_epgdata' as my listing provider, so no "programid"):


This is my recording rule, which should record every showing, but skips 
duplicates based on "subtitle" only:

> MariaDB [mythconverg]> SELECT * FROM record WHERE title='Hawaii Five-0';
> +----------+------+--------+-----------+------------+----------+------------+---------------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+------------+-----------+-----------+-----------------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+------------+
> | recordid | type | chanid | starttime | startdate  | endtime  | enddate    | title         | subtitle  | description                                                                                                                                                                                                                                                                                                                                    | season | episode | category | profile | recpriority | autoexpire | maxepisodes | maxnewest | startoffset | endoffset | recgroup | dupmethod | dupin | station    | seriesid  | programid | inetref         | search | autotranscode | autocommflag | autouserjob1 | autouserjob2 | autouserjob3 | autouserjob4 | autometadata | findday | findtime | findid | inactive | parentid | transcoder | playgroup | prefinput | next_record         | last_record         | last_delete         | storagegroup | avg_delay | filter | recgroupid |
> +----------+------+--------+-----------+------------+----------+------------+---------------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+------------+-----------+-----------+-----------------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+------------+
> |       85 |    4 |  55622 | 20:15:00  | 2021-01-09 | 21:15:00 | 2021-01-09 | Hawaii Five-0 | Quinn Liu | Dem Exmarineoffizier Steve McGarrett wird von der Gouverneurin von Hawaii die Leitung einer Sondereinheit zur Bekämpfung des organisierten Verbrechens auf Hawaii übertragen. Dafür nimmt er den ehemaligen Polizisten Chin Ho Kelly, den Polizisten Danny "Danno" Williams und die junge Polizistin Kona "Kono" Kalakaua in sein Team auf.    |     10 |       1 | Action   | Default |           0 |          0 |           0 |         0 |           0 |         0 | US Crime |         2 |     2 | kabel eins | 173914608 |           | ttvdb.py_164541 |      0 |             0 |            1 |            0 |            0 |            0 |            0 |            1 |       1 | 22:10:00 | 738164 |        0 |        0 |          0 | Default   |         0 | 2021-01-16 19:15:00 | 2021-01-09 20:13:01 | 2021-01-08 18:08:27 | Crime        |       183 |      0 |          5 |
> +----------+------+--------+-----------+------------+----------+------------+---------------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+------------+-----------+-----------+-----------------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+------------+
> 1 row in set (0.001 sec)

That episode is aired again the following week:

> MariaDB [mythconverg]> SELECT * FROM program WHERE title='Hawaii Five-0' AND subtitle='Der Passagier auf 4C';
> +--------+---------------------+---------------------+---------------+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------------+---------+-------+-----------------+-----------------+--------+-----------+------+----------------+------------+-----------+-----------+-----------------+----------+-----------+-------------------------+-----------+----------+---------+---------------+-------+------+-----------+---------------+-----------+---------+--------+---------+---------------+
> | chanid | starttime           | endtime             | title         | subtitle             | description                                                                                                                                                                                                                                                                                                                                                                                                                                  | category | category_type | airdate | stars | previouslyshown | title_pronounce | stereo | subtitled | hdtv | closecaptioned | partnumber | parttotal | seriesid  | originalairdate | showtype | colorcode | syndicatedepisodenumber | programid | manualid | generic | listingsource | first | last | audioprop | subtitletypes | videoprop | inetref | season | episode | totalepisodes |
> +--------+---------------------+---------------------+---------------+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------------+---------+-------+-----------------+-----------------+--------+-----------+------+----------------+------------+-----------+-----------+-----------------+----------+-----------+-------------------------+-----------+----------+---------+---------------+-------+------+-----------+---------------+-----------+---------+--------+---------+---------------+
> |  55622 | 2021-01-16 20:15:00 | 2021-01-16 21:15:00 | Hawaii Five-0 | Der Passagier auf 4C | Jahrzehnte nach dem Absturz wird ein verschollenes Flugzeugwrack am Meeresgrund entdeckt. Nicht nur, dass die ungeklärte Unfallursache nun endlich aufgeklärt werden kann, fördert die Bergung noch einen weiteren Fall zutage. In den mittlerweile stark angegriffenen Überresten finden die Ermittler eine Leiche, die definitiv erst nach dem Absturz im Flieger platziert wurde. Das Team steht vor komplizierten Nachforschungen...     | Action   | series        |    2019 |     0 |               0 |                 |      0 |         1 |    0 |              0 |          0 |         0 | 173914608 | NULL            |          |           |                         |           |        0 |       0 |             4 |     1 |    0 |           | NORMAL        |           |         |      0 |       0 |             0 |
> |  55622 | 2021-01-17 00:55:00 | 2021-01-17 01:40:00 | Hawaii Five-0 | Der Passagier auf 4C | Jahrzehnte nach dem Absturz wird ein verschollenes Flugzeugwrack am Meeresgrund entdeckt. Nicht nur, dass die ungeklärte Unfallursache nun endlich aufgeklärt werden kann, fördert die Bergung noch einen weiteren Fall zutage. In den mittlerweile stark angegriffenen Überresten finden die Ermittler eine Leiche, die definitiv erst nach dem Absturz im Flieger platziert wurde. Das Team steht vor komplizierten Nachforschungen...     | Action   | series        |    2019 |     0 |               0 |                 |      0 |         1 |    0 |              0 |          0 |         0 | 173914608 | NULL            |          |           |                         |           |        0 |       0 |             4 |     0 |    1 |           | NORMAL        |           |         |      0 |       0 |             0 |
> +--------+---------------------+---------------------+---------------+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------------+---------+-------+-----------------+-----------------+--------+-----------+------+----------------+------------+-----------+-----------+-----------------+----------+-----------+-------------------------+-----------+----------+---------+---------------+-------+------+-----------+---------------+-----------+---------+--------+---------+---------------+
> 2 rows in set (0.002 sec)

And the earliest showing is scheduled for recording:

> MariaDB [mythconverg]> SELECT * FROM oldrecorded WHERE title='Hawaii Five-0' AND subtitle='Der Passagier auf 4C';
> +--------+---------------------+---------------------+---------------+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+-----------+-----------+-----------------+--------+----------+------------+---------+-----------+-----------+------------+---------+--------+
> | chanid | starttime           | endtime             | title         | subtitle             | description                                                                                                                                                                                                                                                                                                                                                                                                                                  | season | episode | category | seriesid  | programid | inetref         | findid | recordid | station    | rectype | duplicate | recstatus | reactivate | generic | future |
> +--------+---------------------+---------------------+---------------+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+-----------+-----------+-----------------+--------+----------+------------+---------+-----------+-----------+------------+---------+--------+
> |  55622 | 2021-01-16 20:15:00 | 2021-01-16 21:15:00 | Hawaii Five-0 | Der Passagier auf 4C | Jahrzehnte nach dem Absturz wird ein verschollenes Flugzeugwrack am Meeresgrund entdeckt. Nicht nur, dass die ungeklärte Unfallursache nun endlich aufgeklärt werden kann, fördert die Bergung noch einen weiteren Fall zutage. In den mittlerweile stark angegriffenen Überresten finden die Ermittler eine Leiche, die definitiv erst nach dem Absturz im Flieger platziert wurde. Das Team steht vor komplizierten Nachforschungen...     |      0 |       0 | Action   | 173914608 |           | ttvdb.py_164541 |      0 |       85 | kabel eins |       4 |         0 |        -1 |          0 |       0 |      1 |
> |  55622 | 2021-01-17 00:55:00 | 2021-01-17 01:40:00 | Hawaii Five-0 | Der Passagier auf 4C | Jahrzehnte nach dem Absturz wird ein verschollenes Flugzeugwrack am Meeresgrund entdeckt. Nicht nur, dass die ungeklärte Unfallursache nun endlich aufgeklärt werden kann, fördert die Bergung noch einen weiteren Fall zutage. In den mittlerweile stark angegriffenen Überresten finden die Ermittler eine Leiche, die definitiv erst nach dem Absturz im Flieger platziert wurde. Das Team steht vor komplizierten Nachforschungen...     |      0 |       0 | Action   | 173914608 |           | ttvdb.py_164541 |      0 |       85 | kabel eins |       4 |         0 |         4 |          0 |       0 |      1 |
> +--------+---------------------+---------------------+---------------+----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+-----------+-----------+-----------------+--------+----------+------------+---------+-----------+-----------+------------+---------+--------+
> 2 rows in set (0.002 sec)

But I already have this episode recorded:

> MariaDB [mythconverg]> SELECT * FROM recorded WHERE title='Hawaii Five-0' AND subtitle='Der Passagier auf 4C';
> +--------+---------------------+---------------------+---------------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------+----------+---------+---------+------------+-------------+----------+----------+-----------+-----------+-----------------+---------------------+------------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+--------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+---------------------+------------+------------+-----------+
> | chanid | starttime           | endtime             | title         | subtitle             | description                                                                                                                                                                                                                                                                                                                                    | season | episode | category | hostname | bookmark | editing | cutlist | autoexpire | commflagged | recgroup | recordid | seriesid  | programid | inetref         | lastmodified        | filesize   | stars | previouslyshown | originalairdate | preserve | findid | deletepending | transcoder | timestretch | recpriority | basename                 | progstart           | progend             | playgroup | profile | duplicate | transcoded | watched | storagegroup | bookmarkupdate      | recgroupid | recordedid | inputname |
> +--------+---------------------+---------------------+---------------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------+----------+---------+---------+------------+-------------+----------+----------+-----------+-----------+-----------------+---------------------+------------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+--------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+---------------------+------------+------------+-----------+
> |  55626 | 2020-02-12 01:38:00 | 2020-02-12 02:20:00 | Hawaii Five-0 | Der Passagier auf 4C | Dem Exmarineoffizier Steve McGarrett wird von der Gouverneurin von Hawaii die Leitung einer Sondereinheit zur Bekämpfung des organisierten Verbrechens auf Hawaii übertragen. Dafür nimmt er den ehemaligen Polizisten Chin Ho Kelly, den Polizisten Danny "Danno" Williams und die junge Polizistin Kona "Kono" Kalakaua in sein Team auf.    |     10 |       3 | Action   | barrel   |        0 |       0 |       0 |          0 |           1 | US Crime |       85 | 173914608 |           | ttvdb.py_164541 | 2020-02-13 20:51:57 | 1329837461 |     0 |               0 | 2019-01-01      |        0 |      0 |             0 |          0 |           1 |           0 | 55626_20200212013800.m4v | 2020-02-12 01:40:00 | 2020-02-12 02:15:00 | Default   | Default |         0 |          1 |       0 | Crime        | 0000-00-00 00:00:00 |          5 |       4853 | Input 1   |
> +--------+---------------------+---------------------+---------------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------+----------+---------+---------+------------+-------------+----------+----------+-----------+-----------+-----------------+---------------------+------------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+--------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+---------------------+------------+------------+-----------+
> 1 row in set (0.005 sec)


This (currently) if the only episode scheduled for re-recording, but 
I've seen this (strange) behavior for other episodes of this and other 
series before.

There are many more episodes of this series scheduled for the next days, 
which are NOT recorded as I also already have them; so duplicate 
matching works for them and they are detected as "repeats".

It might be relevant that I'm currently missing the previous episode, 
which is correctly scheduled to be recorded.

What am I missing?

> mythbackend -v schedule --testsched 2>&1 | less
was not enlightening.

Philipp

PS: Is there some easy way to also use `tv_augment` when 
`mythfilldatabase` invokes `tv_grab_eu_epgdata` as they have the 
annoying behavior to not have consistent naming over time: This year 
they call the series "Navy CIS: L.A.", but the past years they called it 
"NCIS: Los Angeles" or "Navy CIS: Los Angeles" or "NCIS: Los Angeles". 
This is easy to match by using a "Power Recordign Rule", but as 
"programid" is not set, duplicate matching is based on "title", which is 
not consistent.


More information about the mythtv-users mailing list