[mythtv] sql errors with tv_grab_zz_sdjson_sqlite

Bill Meek keemllib at gmail.com
Sun Dec 16 22:19:27 UTC 2018


On 12/16/18 2:31 PM, Robert Kulagowski wrote:
> On Sun, Dec 16, 2018 at 2:15 PM Paul B. Henson <henson at acm.org> wrote:
>>
>> On Sun, Dec 16, 2018 at 09:31:21PM +1300, Stephen Worthington wrote:
>>
>>> What it looks like is the XML data has multiple genres specified for
>>> some programs.
>>
>> Hmm, yes, looking at the file there are multiple genres (which appear to
>> be called categories in the xml):
>>
>>   <programme channel="I96011.json.schedulesdirect.org" start="20181216010000 +0000" stop="20181216020000 +0000"
>>>
>>    <title>Barefoot Dreams - California Style</title>
>>    <desc lang="en">Super-soft wraps, cardigans, blankets and more.</desc>
>>    <credits></credits>
>>    <category>series</category>
>>    <category>Fashion</category>
>>    <category>Shopping</category>
>>    <category>Series</category>
>>    <category>Show</category>
> 
> [I run the JSON service at Schedules Direct]
> 
> If you send me the programID then I can check if the program data on
> our end is wrong.

I don't have the issue and there are thousands of Series/series cases:

mysql> SELECT COUNT(genre) FROM programgenres WHERE BINARY 'series' = genre;
+--------------+
| COUNT(genre) |
+--------------+
|        42624 |
+--------------+
mysql> SELECT COUNT(genre) FROM programgenres WHERE BINARY 'Series' = genre;
+--------------+
| COUNT(genre) |
+--------------+
|        42206 |
+--------------+

I obviously didn't see if all have a Series and series for the same chanid/startrtime
case, but running mythfilldatabase -v database shows this one example. Note that the
programgenres entry is cleared first:

DELETE FROM programgenres WHERE starttime >= '2018-12-16T13:00:00Z' AND starttime < '2018-12-16T14:30:00Z' AND chanid = '1321' ;
INSERT INTO programgenres        ( chanid,  starttime, genre,  relevance) VALUES ('1321', '2018-12-16T13:00:00Z',    'series', '0')
INSERT INTO programgenres        ( chanid,  starttime, genre,  relevance) VALUES ('1321', '2018-12-16T13:00:00Z',    'News', '1')
INSERT INTO programgenres        ( chanid,  starttime, genre,  relevance) VALUES ('1321', '2018-12-16T13:00:00Z',    'Series', '2')
INSERT INTO programgenres        ( chanid,  starttime, genre,  relevance) VALUES ('1321', '2018-12-16T13:00:00Z',    'Show', '3')

So it appears that the DELETE is failing in this case.

There aren't any log messages here, but it does fire when I added one:

    https://code.mythtv.org/cgit/mythtv/tree/mythtv/libs/libmythtv/programdata.cpp#n1277

You can run mythfilldatabase -v database and see if the DELETEs are running
and what timestamps are used.

-- 
Bill


More information about the mythtv-dev mailing list