blob: 50fb460e0df1806d30462a972b57118808a1f6e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
<%pre>
#include <vdr/plugin.h>
#include <vdr/channels.h>
#include <vdr/epg.h>
#include <vdr/config.h>
#include <vdr/i18n.h>
#include "setup.h"
#include "tools.h"
using namespace std;
using namespace vdrlive;
</%pre>
<%args>
type = "now";
</%args>
<%include>page_init.eh</%include>
<{
cSchedulesLock schedulesLock;
const cSchedules* Schedules = cSchedules::Schedules(schedulesLock);
string head;
if (type == "now") {
head = tr("What's running at")+string(" ")+FormatDateTime(tr("%I:%M %p"), time(0));
} else {
type="next";
head = tr("What's on next?");
}
}>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>VDR-Live - <$ head $></title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<& tooltip.javascript &>
</head>
<body>
<& pageelems.logo &>
<& menu active=(type) &>
<div class="inhalt">
<{
ReadLock channelsLock( Channels );
if (channelsLock) {
for (cChannel *Channel = Channels.First(); Channel && Channel->Number() <= LiveSetup().GetLastChannel(); Channel = Channels.Next(Channel)) {
if (!Channel->GroupSep()) {
const cSchedule *Schedule = Schedules->GetSchedule(Channel);
if (Schedule) {
const cEvent *Event = (type == "now" ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent());
if (Event) {
string title(Event->Title() ? Event->Title() : "");
string channel_name(Channel->Name());
string short_description(Event->ShortText() ? Event->ShortText() : "");
string description(Event->Description() ? Event->Description() : "");
string start(Event->StartTime() ? FormatDateTime(tr("%I:%M %p"), Event->StartTime()) : "");
string end(Event->EndTime() ? FormatDateTime(tr("%I:%M %p"), Event->EndTime()) : "");
tChannelID channel_id(Channel->GetChannelID());
tEventID event = Event->EventID();
bool truncated = false;
description = StringWordTruncate(description, 250, truncated);
if (truncated) {
description += string(" ") + tr("more") + string(" ...");
}
}>
<div class="event">
<div class="station">
<div><div><div><$ channel_name $></div></div></div>
</div>
<div class="tools">
<& pageelems.event_timer channelid=(channel_id) eventid=(event) &>
</div>
<div class="content">
<div class="info"><$ start $> - <$ end $></div>
<div class="title"><$ title $></div>
<div class="short"><$ short_description $></div>
<div class="description">
<$ description $>
</div>
</div>
</div>
<{
}
}
}
}
}
}>
</div>
</body>
</html>
<%include>page_exit.eh</%include>
|