Ian Campbell
2016-10-29 10:30:07 UTC
Hi all,
mythfilldatabase is complaining with about half a dozen of these (full
log attached):
016-10-29 06:31:23.556459 E DB Error (programrating insert):
Query was:
INSERT INTO programrating ( chanid, starttime, system, rating) VALUES (?, ?, ?, ?)
Bindings were:
:CHANID=8173, :RATING="G", :START=2016-11-01T10:00:00Z,
:SYS="Canadian Parental Rating"
Driver error was [2/1062]:
QMYSQL3: Unable to execute statement
Database error was:
Duplicate entry '8173-2016-11-01 10:00:00-Canadian-G' for key 'chanid'
I've seen this issue before and IIRC Robert (K) you fixed it at the
source, but it's happening again (has been for a while but I didn't get
round to writing this mail). The last time it seemed to be suggested
(in https://sourceforge.net/p/xmltv/mailman/message/35109896/) that
xmltv ought really to be dedupping (as well as SD upstream doing so?
although AIUI dedupping was already added to the server side last time
too) which is why I'm bringing this up here to start with rather than
the SD forums.
Looking at the corresponding xml for the above program I find:
<programme start="20161101100000 +0000" stop="20161101110000 +0000" channel="24321">
<title>Homes Under the Hammer</title>
<desc>[...snip...]</desc>
<credits>
[...snip...]
</credits>
<category>House/garden</category>
<category>Home improvement</category>
<category>Series</category>
<category>series</category>
<episode-num system="xmltv_ns">19 . 46 . </episode-num>
<episode-num system="dd_progid">EP012598221009</episode-num>
<previously-shown start="20161101" />
<new />
<rating system="Canadian Parental Rating">
<value>G</value>
</rating>
<rating system="Canadian Parental Rating">
<value>G</value>
</rating>
<rating system="USA Parental Rating">
<value>TVG</value>
</rating>
<rating system="USA Parental Rating">
<value>TVG</value>
</rating>
</programme>
and in the original json:
{
"genres": [
"House/garden",
"House/garden",
"Home improvement",
"Home improvement"
],
"showType": "Series",
"resourceID": "402752",
"hasImageArtwork": true,
"entityType": "Episode",
"contentRating": [
{
"body": "Canadian Parental Rating",
"country": "CAN",
"code": "G"
},
{
"body": "Canadian Parental Rating",
"country": "CAN",
"code": "G"
},
{
"body": "USA Parental Rating",
"country": "USA",
"code": "TVG"
},
{
"body": "USA Parental Rating",
"country": "USA",
"code": "TVG"
}
],
"crew": [...],
"originalAirDate": "2016-11-01",
"cast": [...] ,
"programID": "EP012598221009",
[...]
"md5": "RSXtIpywuLR7QFbI5Rd+vA",
"metadata": [
{
"Gracenote": {
"season": 20,
"episode": 47
}
}
]
}
So it does seem to be coming from the source.
I guess I should start looking into dedup on the XMLTV side?
Ian.
mythfilldatabase is complaining with about half a dozen of these (full
log attached):
016-10-29 06:31:23.556459 E DB Error (programrating insert):
Query was:
INSERT INTO programrating ( chanid, starttime, system, rating) VALUES (?, ?, ?, ?)
Bindings were:
:CHANID=8173, :RATING="G", :START=2016-11-01T10:00:00Z,
:SYS="Canadian Parental Rating"
Driver error was [2/1062]:
QMYSQL3: Unable to execute statement
Database error was:
Duplicate entry '8173-2016-11-01 10:00:00-Canadian-G' for key 'chanid'
I've seen this issue before and IIRC Robert (K) you fixed it at the
source, but it's happening again (has been for a while but I didn't get
round to writing this mail). The last time it seemed to be suggested
(in https://sourceforge.net/p/xmltv/mailman/message/35109896/) that
xmltv ought really to be dedupping (as well as SD upstream doing so?
although AIUI dedupping was already added to the server side last time
too) which is why I'm bringing this up here to start with rather than
the SD forums.
Looking at the corresponding xml for the above program I find:
<programme start="20161101100000 +0000" stop="20161101110000 +0000" channel="24321">
<title>Homes Under the Hammer</title>
<desc>[...snip...]</desc>
<credits>
[...snip...]
</credits>
<category>House/garden</category>
<category>Home improvement</category>
<category>Series</category>
<category>series</category>
<episode-num system="xmltv_ns">19 . 46 . </episode-num>
<episode-num system="dd_progid">EP012598221009</episode-num>
<previously-shown start="20161101" />
<new />
<rating system="Canadian Parental Rating">
<value>G</value>
</rating>
<rating system="Canadian Parental Rating">
<value>G</value>
</rating>
<rating system="USA Parental Rating">
<value>TVG</value>
</rating>
<rating system="USA Parental Rating">
<value>TVG</value>
</rating>
</programme>
and in the original json:
{
"genres": [
"House/garden",
"House/garden",
"Home improvement",
"Home improvement"
],
"showType": "Series",
"resourceID": "402752",
"hasImageArtwork": true,
"entityType": "Episode",
"contentRating": [
{
"body": "Canadian Parental Rating",
"country": "CAN",
"code": "G"
},
{
"body": "Canadian Parental Rating",
"country": "CAN",
"code": "G"
},
{
"body": "USA Parental Rating",
"country": "USA",
"code": "TVG"
},
{
"body": "USA Parental Rating",
"country": "USA",
"code": "TVG"
}
],
"crew": [...],
"originalAirDate": "2016-11-01",
"cast": [...] ,
"programID": "EP012598221009",
[...]
"md5": "RSXtIpywuLR7QFbI5Rd+vA",
"metadata": [
{
"Gracenote": {
"season": 20,
"episode": 47
}
}
]
}
So it does seem to be coming from the source.
I guess I should start looking into dedup on the XMLTV side?
Ian.