[mythtv] sql errors with tv_grab_zz_sdjson_sqlite

Paul B. Henson henson at acm.org
Sun Dec 16 20:14:20 UTC 2018


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>

However, it looks like the table schema allows multiple genres per
program, the primary key is the tuple (`chanid`,`starttime`,`relevance`),
and while there is an index on genre it is multivalued.

Looking at the data, there are multiple entries in the table for most
shows, but it seems they have to have a different relevance column. I
think it's breaking because it's trying to insert two rows for the same
show with the same relevance. I don't see any reference to relevance
in the xml, where does the mapping from xml category to genre relevance
come from?

One odd thing is that the xml includes both "series" and "Series" in
the categories.

Thanks for the help...



More information about the mythtv-dev mailing list