Opened 15 years ago
Closed 15 years ago
#6187 closed enhancement (invalid)
REQ: Status page to show minimum and maximum endtimes in program table
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - General | Version: | |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description (last modified by )
At the moment the status page in MythTV shows the maximum endtime available in the program table, but I would like to suggest a improvement to make it a little more sane, as in some cases, like here in Holland, not all channels have the same amount of days in the future published (some only 3 days, where others might have 14 days of data ahead).
I therefore would like the query to be rewritten to the following:
SELECT MIN(t1.per_chanid_endtime) min_endtime, MAX(t1.per_chanid_endtime) max_endtime FROM ( SELECT chanid, MAX(endtime) per_chanid_endtime FROM program WHERE manualid=0 GROUP BY chanid ) AS t1;
This will list the minimum endtime as well as the maximum endtime like this:
mysql> SELECT MIN(t1.per_chanid_endtime) min_endtime, MAX(t1.per_chanid_endtime) max_endtime FROM ( SELECT chanid, MAX(endtime) per_chanid_endtime FROM program WHERE manualid=0 GROUP BY chanid) as t1; +---------------------+---------------------+ | min_endtime | max_endtime | +---------------------+---------------------+ | 2009-01-31 00:10:00 | 2009-02-12 09:00:00 | +---------------------+---------------------+ 1 row in set (0.12 sec)
This makes it more obvious (and earlier when there still is no problem) to the users whether there might be a problem with their grabber(s) compared to listing only the maximum like is done now.
Since I do not have too much coding skills I am not able to attach a patch at the moment, but I beleive changes should be made in MythFrontend as well as MythWeb.
I might be able to supply a patch for MythWeb soonish as I have PHP skills but my C skills are a bit rusty.
Should I raise a seperate issue for each or can we trac that using this bug?
Change History (4)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Nope, retrying with a few extra newlines: mysql> SELECT MIN(t1.per_chanid_endtime) min_endtime, MAX(t1.per_chanid_endtime) max_endtime FROM ( SELECT chanid, MAX(endtime) per_chanid_endtime FROM program WHERE manualid=0 GROUP BY chanid) as t1\G
* 1. row *
min_endtime: 2009-01-31 00:10:00
max_endtime: 2009-02-12 09:00:00
1 row in set (0.00 sec)
mysql>
comment:4 Changed 15 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closed. Feature request without a patch.
Oops it seems the formatting of Trac is a little different in preview and actual view which makes the resultset not very readable, perhaps this is better:
mysql> SELECT MIN(t1.per_chanid_endtime) min_endtime, MAX(t1.per_chanid_endtime) max_endtime FROM ( SELECT chanid, MAX(endtime) per_chanid_endtime FROM program WHERE manualid=0 GROUP BY chanid) as t1\G * 1. row * min_endtime: 2009-01-31 00:10:00 max_endtime: 2009-02-12 09:00:00 1 row in set (0.00 sec)