diff options
author | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2008-11-20 01:06:50 +0100 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2008-11-20 01:06:50 +0100 |
commit | 83f3a62b1969e8e54b03e115871e3282dea5401d (patch) | |
tree | b82def7f26a1225912b6d716a5b7c2df4a6988f3 | |
parent | 96474e9e25f57b03287994781e54577736502bce (diff) | |
download | vdr-plugin-live-83f3a62b1969e8e54b03e115871e3282dea5401d.tar.gz vdr-plugin-live-83f3a62b1969e8e54b03e115871e3282dea5401d.tar.bz2 |
Added time information to the 'no EPG available' boxes in what's on.
-rw-r--r-- | pages/pageelems.ecpp | 4 | ||||
-rw-r--r-- | pages/whats_on.ecpp | 23 |
2 files changed, 19 insertions, 8 deletions
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 9222115..8327d47 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -290,13 +290,13 @@ int update_status(1); <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveSetup().GetUseStreamdev() && elapsed > 0 && LiveFeatures<features::streamdev_server>().Loaded()) { </%cpp><a href="vlc.html?channel=<$ channelId $>"><img src="<$ LiveSetup().GetThemedLink("img", "stream_button.png") $>" alt="" <& tooltip.hint text=(tr("Stream this channel into browser.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td> <td class="action <? lastCurrentChanel ? "bottomrow"?>"> <%cpp> - if (eventId != 0) { + if (eventId != 0) { </%cpp> <& pageelems.imdb_info_href title=(title) &> <%cpp> } </%cpp> </td> -<%cpp> +<%cpp> } </%cpp> </%def> diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index 51312a1..e188fee 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -44,6 +44,7 @@ const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); string head; time_t seektime = 0; string displaytime; +string headTime; if (mode.empty()) mode = LiveSetup().GetLastWhatsOnListMode(); @@ -56,8 +57,10 @@ current_attime = attime; current_fixtime = fixtime; if (type == "now") { - head = tr("What's running at")+string(" ")+FormatDateTime(tr("%I:%M %p"), time(0)); + headTime = FormatDateTime(tr("%I:%M %p"), time(0)); + head = tr("What's running at")+string(" ") + headTime; } else if (type == "next") { + headTime = FormatDateTime(tr("%I:%M %p"), time(0) + 3600); head = tr("What's on next?"); } else if (type == "at") { if (attime != "") @@ -69,7 +72,8 @@ if (type == "now") { seektime = GetTimeT(displaytime); if (seektime - time(0) + 3600 < 0) // if wanted time is past more then 1h, then use tomorrow seektime += SECSINDAY; - head = tr("What's running at") + string(" ") + FormatDateTime(tr("%I:%M %p"), seektime) +string(" (") +FormatDateTime(tr("%a, %b %d"), seektime) + string(")"); + headTime = FormatDateTime(tr("%I:%M %p"), seektime) + " (" + FormatDateTime(tr("%a, %b %d"), seektime) + ")"; + head = tr("What's running at") + string(" ") + headTime; } else if (type == "favs") { head = tr("Favorites"); } @@ -168,6 +172,13 @@ if (type == "now") { if (!Channel) continue; int chNumber = Channel->Number(); + string startTime(epgEvent->StartTime(tr("%I:%M %p"))); + string endTime(epgEvent->EndTime(tr("%I:%M %p"))); + + string timeSpan(mode=="detail" ? headTime : string()); + if (!startTime.empty() || !endTime.empty()) + timeSpan = startTime + " - " + endTime; + if (mode == "detail") { </%cpp> <div class="event"> @@ -179,7 +190,7 @@ if (type == "now") { <& pageelems.epg_tool_box detail=(1) epgid=(epgEvent->Id()) title=(epgEvent->Title()) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) &> </div> <div> - <div class="info"><$ (epgEvent->StartTime(tr("%I:%M %p"))) $> - <$ (epgEvent->EndTime(tr("%I:%M %p"))) $></div> + <div class="info"><$ (timeSpan) $></div> % if (epgEvent->Elapsed() >= 0) { <div class="progress"><div><& pageelems.progressbar progress=(epgEvent->Elapsed()) &></div></div> % } @@ -197,14 +208,14 @@ if (type == "now") { std::list<EpgInfoPtr>::iterator last = i; bool lastCurrentChanel = (++last == eventList.end()); tChannelID chanId; - tEventID eventId; + tEventID eventId; EpgEvents::DecodeDomId(epgEvent->Id(), chanId, eventId); </%cpp> <tr> <& pageelems.epg_tool_box detail=(0) epgid=(epgEvent->Id()) title=(epgEvent->Title()) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) lastCurrentChanel=(lastCurrentChanel ? 1 : 0) &> <td class="topaligned <? lastCurrentChanel ? "bottomrow"?>"> <div class="withmargin"> - <div class="nomargin"><$ (epgEvent->StartTime(tr("%I:%M %p"))) $> - <$ (epgEvent->EndTime(tr("%I:%M %p"))) $></div> + <div class="nomargin"><$ (timeSpan) $></div> % if (epgEvent->Elapsed() >= 0) { <div class="progress"><div><& pageelems.progressbar progress=(epgEvent->Elapsed()) &></div></div> % } @@ -219,7 +230,7 @@ if (type == "now") { % } ><span class="title"><$ (epgEvent->Title()) $></span><br /><span class="short"><$ (epgEvent->ShortDescr()) $></span></a> % } else { - <span class="title"><$ (epgEvent->Title()) $></span> + <span class="title"><$ (epgEvent->Title()) $></span> % } </div> </td> |