From e2a48d8701f91b8e24fbe9e99e91eb72a87bb749 Mon Sep 17 00:00:00 2001 From: horchi Date: Sun, 5 Mar 2017 16:39:28 +0100 Subject: git init --- scripts/epgd-showtimer | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/epgd-showtimer (limited to 'scripts/epgd-showtimer') 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;" -- cgit v1.2.3