Ticket #6898: a--EXAMPLE-DATA

File a--EXAMPLE-DATA, 2.1 KB (added by f-myth-users@…, 15 years ago)
Line 
1Here's a typical example of a program that was claimed to be longer
2than its timeslot, and really was---a recording that padded the ending
3by only 2 minutes past the claimed timeslot lost the last several
4minutes of the actual movie:
5
6    program id='MV000008560000'>
7    <title>Duel</title>
8    <description>The unseen driver of a tailgating semi tries to run a traveling salesman (Dennis Weaver) off the road.</description>
9    <mpaaRating>PG</mpaaRating>
10    <starRating>***+</starRating>
11    <runTime>PT01H35M</runTime>
12    <year>1971</year>
13    <advisories>
14    <advisory>Violence</advisory>
15    </advisories>
16    </program>
17
18    <schedule program='MV000008560000' station='12852' time='2009-06-06T08:30:00Z' duration='PT01H30M'/>
19
20Here are some tcsh aliases for noticing such things, given that the
21patch is installed and the relevant data is in the DB.  You'll have
22to supply your own settings for dbhost, dbuser, and dbpass, of course:
23
24    setenv dbargs    "-h $dbhost -u${dbuser} -p${dbpass} mythconverg"
25
26    alias inmysql   'mysql -s -B $dbargs \!*'
27    alias domysql   'inmysql --exec \!*'
28
29    setenv sd_table "program, record"
30    setenv sd_diff  "(UNIX_TIMESTAMP(program.endtime) - UNIX_TIMESTAMP(program.starttime))"
31    setenv sd_min   "(program.sd_runtime * 60)"
32    setenv sd_match "program.title = record.title AND program.chanid = record.chanid AND program.sd_runtime > 0 AND $sd_diff < $sd_min"
33    setenv sd_order "title, starttime"
34    setenv sd_over  "FLOOR(($sd_min - $sd_diff) / 60) AS overflow"
35    setenv sd_rest  "program.sd_runtime, program.title, program.chanid, program.starttime, program.endtime"
36    setenv sd_show  "$sd_over, $sd_rest"
37
38    alias overflows  'domysql "SELECT $sd_show FROM $sd_table WHERE $sd_match ORDER BY $sd_order;"'
39
40...and here's the output:
41
42    > overflows
43    15      75      Dr. Jack        3213    2009-08-05 09:30:00     2009-08-05 10:30:00
44    10      105     Drama/Mex       3201    2009-08-11 23:00:00     2009-08-12 00:35:00
45    11      86      For Heaven's Sake       3213    2009-08-05 17:15:00     2009-08-05 18:30:00
46    2       77      Why Worry?      3213    2009-08-05 12:00:00     2009-08-05 13:15:00