[mythtv-commits] Ticket #13011: Feature patch: Validate the XMLTV programme starttime/channel early in mythfilldatabase
MythTV
noreply at mythtv.org
Tue Mar 7 00:59:57 UTC 2017
#13011: Feature patch: Validate the XMLTV programme starttime/channel early in
mythfilldatabase
-------------------------------------------------+-------------------------
Reporter: Gary Buhrmaster | Owner: stuartm
<gary.buhrmaster@…> |
Type: Patch - Feature | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - Mythfilldatabase | Version: Master Head
Severity: medium | Keywords:
Ticket locked: 0 |
-------------------------------------------------+-------------------------
Validate the XMLTV programme starttime/channel early in mythfilldatabase
If a xmltv programme entry contains an invalid (or missing) start time,
the resulting program object will have not have a starttime, which can
result in attempts to insert into the program table and receiving
constraint errors of the form:
{{{
2017-03-01 11:22:19.996778 E [14104/14104] CoreContext mythdb.cpp:183
(DBError) - DB Error (program insert):
Query was:
REPLACE INTO program ( chanid, title, subtitle, description, category,
category_type, starttime, endtime, closecaptioned, stereo, hdtv,
subtitled, subtitletypes, audioprop, videoprop, partnumber, parttotal,
syndicatedepisodenumber, airdate, originalairdate, listingsource,
seriesid, programid, previouslyshown, stars, showtype, title_pronounce,
colorcode, season, episode, totalepisodes, inetref ) VALUES( ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ? )
Bindings were:
:AIRDATE="2017", :AUDIOPROP=0, :CATEGORY="Shopping", :CATTYPE="tvshow",
:CC=false, :CHANID=30027, :COLORCODE="", :DESCRIPTION="Paid programming.",
:ENDTIME="0000-00-00 00:00:00", :EPISODE=0, :HASSUBTITLES=false,
:HDTV=true, :INETREF="", :LSOURCE=4, :ORIGAIRDATE=NULL, :PARTNUMBER=0,
:PARTTOTAL=0, :PREVSHOWN=true, :PROGRAMID="SH000000010000", :SEASON=0,
:SERIESID="EP00000001", :SHOWTYPE="", :STARS=0, :STARTTIME=NULL,
:STEREO=false, :SUBTITLE="", :SUBTYPES=0, :SYNDICATENO="", :TITLE="Paid
Programming", :TITLEPRON="", :TOTALEPISODES=0, :VIDEOPROP=1
Driver error was [2/1048]:
QMYSQL3: Unable to execute statement
Database error was:
Column 'starttime' cannot be null
}}}
If the programme entry does not have a channel there will be messages
later about channel mismatching.
The xmltv dtd requires that start and channel are provided in the
programme element.
This patch adds in validation to verify we obtain a valid xmltv start and
channel. Handling this early allows (slightly) better informational
messages and avoids the constraint db error.
github ref:
https://github.com/garybuhrmaster/mythtv/commit/1f7848422fff5153132fa77967643d1848d3280e
github git-am ref:
https://github.com/garybuhrmaster/mythtv/commit/1f7848422fff5153132fa77967643d1848d3280e.patch
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13011>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list