diff options
Diffstat (limited to 'scripts/epgd-showtimer')
-rwxr-xr-x | scripts/epgd-showtimer | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/epgd-showtimer b/scripts/epgd-showtimer new file mode 100755 index 0000000..be18de6 --- /dev/null +++ b/scripts/epgd-showtimer @@ -0,0 +1,18 @@ +export MYSQL_PWD=epg + +if [ -z $1 ]; then + STATE="(t.state != 'D' or t.state is null)" +else + STATE="t.state like '$1'" +fi + +mysql -u epg2vdr -Depg2vdr -e " \ +select from_unixtime(t.inssp, '%d.%m %H:%i') as ins, v.name, substr(t.source, 25) as source, t.id, t.autotimerid as aid, t.state as S, t.info, t.action as A, \ + t.eventid, concat(from_unixtime(day, '%d.%m '), concat_ws(':', right(concat("00", t.starttime DIV 100), 2), right(concat("00", t.starttime%100), 2))) as start, \ + concat_ws(':', right(concat("00", t.endtime DIV 100), 2), right(concat("00", t.endtime%100), 2)) as end, \ + e.title, e.shorttext, t.file \ + from \ + timers t left outer join events e on (t.eventid = e.masterid), vdrs v \ + where \ + v.uuid = t.vdruuid and $STATE \ + order by t.day, start;" |