Skip to content

Commit

Permalink
3.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Ehrnsperger committed Jun 9, 2023
1 parent 2391bfe commit f1740e5
Show file tree
Hide file tree
Showing 21 changed files with 429 additions and 178 deletions.
36 changes: 26 additions & 10 deletions epg_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ namespace vdrlive
{
}

const std::string EpgInfo::ChannelName() const
{ const cChannel* channel = Channel();
return channel ? channel->Name() : "";
}

const std::string EpgInfo::CurrentTime(const char* format) const
{
return FormatDateTime(format, time(0));
Expand Down Expand Up @@ -175,6 +180,12 @@ namespace vdrlive
return (info && info->Description()) ? info->Description() : "";
}

const std::string EpgRecording::ChannelName() const
{
const cRecordingInfo* info = m_recording ? m_recording->Info() : 0;
return info && info->ChannelName() ? info->ChannelName(): "";
}

const std::string EpgRecording::Archived() const
{
if (!m_checkedArchived && m_recording) {
Expand Down Expand Up @@ -215,19 +226,24 @@ namespace vdrlive

int EpgRecording::Elapsed() const
{
if (!m_recording)
return -1;
int current, total;
// try currently playing recording if any
cControl* pControl = cControl::Control();
if (pControl)
{
int current, total;
if (pControl->GetIndex(current,total))
{
if (total)
{
return (100 * current) / total;
}
}
const cRecording* playing = pControl->GetRecording();
if (playing && playing->Id() == m_recording->Id()
&& pControl->GetIndex(current,total) && total)
return (100 * current) / total;
}
return 0;
// Check for resume position next
current = m_recording->GetResume();
total= m_recording->NumFrames();
if (current > 0 && total > 0)
return (100 * current) / total;
return -1;
}

const std::string EpgRecording::Name() const
Expand Down Expand Up @@ -549,7 +565,7 @@ bool appendEpgItem(cLargeString &epg_item, RecordingsItemPtr &recItem, const cEv
epg_item.append(" - ");
AppendDateTime(epg_item, tr("%I:%M %p"), Event->EndTime() );
epg_item.append(" ");
AppendDuration(epg_item, tr("(%d:%02d)"), Event->Duration() /60/60, Event->Duration()/60 % 60);
AppendDuration(epg_item, tr("(%d:%02d)"), Event->Duration());
epg_item.append("\"]");
return recItemFound;
}
Expand Down
4 changes: 4 additions & 0 deletions epg_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ namespace vdrlive

virtual cChannel const * Channel() const { return 0; }

virtual std::string const ChannelName() const;

virtual std::string const Archived() const { return ""; }

virtual std::string const FileName() const { return ""; }
Expand Down Expand Up @@ -257,6 +259,8 @@ namespace vdrlive

virtual std::string const LongDescr() const;

virtual std::string const ChannelName() const;

virtual std::string const Archived() const;

virtual std::string const FileName() const;
Expand Down
75 changes: 40 additions & 35 deletions live/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ div#pagemenu form a {
}

div#pagemenu form a img {
vertical-align: middle;
vertical-align: middle;
margin-top: -5px;
}

Expand Down Expand Up @@ -711,6 +711,10 @@ div.event div.station {
width: 255px;
}

div.event div.title a {
color: black;
}

div.station div {
margin: 0;
padding: 0;
Expand Down Expand Up @@ -769,7 +773,6 @@ div.content div.tools {
margin: 0;
padding: 0;
padding-top: 3px;

text-align: center;
vertical-align: top;
}
Expand All @@ -778,15 +781,6 @@ div.content div.tools img {
margin: 2px 5px;
}

div.content div {
padding-left: 0px;
margin-left: 35px;
}

div.content div div {
margin-left: 0px;
}

div.description {
margin: 5px 5px 0px 5px;
overflow: hidden;
Expand All @@ -801,13 +795,17 @@ div.short {
}

div.info {
padding: 5px 5px 5px 0px;
margin: 5px 5px 0px 0px;
overflow: hidden;
}

div.info div.time {
div.info div.duration {
float: right;
padding: 0px;
margin: 0px 5px 0px 5px;
}

div.info div.time {
margin: 0px 5px 0px 5px;
}

div.info div.date {
Expand All @@ -817,12 +815,12 @@ div.info div.date {

div.progress {
overflow: hidden;
padding-right: 4px;
padding: 2px 0px;
margin: 0px;
}

div.progress div {
float: right;
float: right;
padding: 0px;
}

Expand Down Expand Up @@ -929,7 +927,13 @@ table.mschedule tr {
height: 12px;
}

table.mschedule td.time {
vertical-align: top;
padding: 5px;
}

table.mschedule tr td.event {
vertical-align: top;
background: transparent url(../img/bg_line.png) bottom repeat-x;
border-bottom: 1px solid #C0C1DA;
}
Expand All @@ -951,15 +955,19 @@ table.mschedule tr td.current_row {
}

table.mschedule tr td.leftcol {
padding-left: 7px;
padding-right: 5px;
padding-left: 7px;
padding-right: 5px;
}

table.mschedule div.content1 {
min-width: 10em;
max-width: 30em;
}

table.mschedule div.content1>div {
margin: 5px 5px 5px 7px;
}

table.mschedule div.tools1 {
float: right;
}
Expand All @@ -969,7 +977,6 @@ table.mschedule div.start {
}

table.mschedule tr td div.title {
padding: 3px;
clear: both;
}

Expand All @@ -988,6 +995,10 @@ table.mschedule a {
font-weight: bold;
}

table.mschedule a>img {
vertical-align: text-bottom;
}

/*
##############################
# Blue Background Thingy
Expand All @@ -1000,12 +1011,12 @@ div.boxheader {
background: url(../img/bg_box_l.png) top left no-repeat;
}

div.boxheader div {
div.boxheader > div {
margin: 0px;
background: url(../img/bg_box_r.png) top right no-repeat;
}

div.boxheader div div {
div.boxheader > div > div {
background: url(../img/bg_box_h.png) repeat-x;
vertical-align: middle;
text-align: left;
Expand All @@ -1016,7 +1027,8 @@ div.boxheader div div {
color: white;
font-weight: bold;
height: 21px;
line-height: 20px;
line-height: 20px;
white-space: nowrap;
}

/*
Expand Down Expand Up @@ -1061,7 +1073,7 @@ tr.recording_item:last-child {
float: left;
}

.recording_item div.recording_imgs{
.recording_item div.recording_imgs {
margin: 2px;
}

Expand Down Expand Up @@ -1099,7 +1111,9 @@ tr.recording_item:last-child {
}

.recording_item div.recording_actions {
padding-left: 5px;
float: right;
padding-left: 0.5em;
padding-right: 0.5em;
}

/*
Expand Down Expand Up @@ -1306,25 +1320,16 @@ div.epg_content {
overflow: hidden;
}

div.epg_content div {
margin-left: 35px;
}

div.epg_content div.epg_tools {
float: left;
width: 26px;
margin: 0;
margin: 0 9px 0 0;
padding: 0;
padding-top: 3px;

text-align: center;
vertical-align: top;
}

div.epg_content div div {
margin-left: 0px;
}

div.epg_content div.epg_tools img {
margin: 2px 5px;
}
Expand Down Expand Up @@ -1358,7 +1363,7 @@ div.epg_content div.about_right {
}

div.epg_content div.about_line {
padding-left: 0px;
padding-left: 30px;
}

div.epg_content div.about_head {
Expand Down
2 changes: 1 addition & 1 deletion live/js/live/infowin.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ var InfoWin = new Class({
this.fireEvent('onDomExtend', [id, bodyElems]);
this.winBody.adopt(bodyElems);
var firstScript = bodyElems.getElement('script.injectIcons');
if (firstScript) {
if (firstScript && firstScript.length && firstScript[0]) {
var js_m = new Element('div').adopt(firstScript).firstChild.textContent;
eval(js_m);
}
Expand Down
4 changes: 2 additions & 2 deletions pages/epginfo.ecpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ using namespace vdrlive;
if (epgEvent->EventDuration() < 0) { // epg event, no recording
start += std::string(" - ") + epgEvent->EndTime(tr("%I:%M %p"));
start += " ";
AppendDuration(start, tr("(%d:%02d)"), epgEvent->Duration()/60/60, epgEvent->Duration()/60 % 60);
AppendDuration(start, tr("(%d:%02d)"), epgEvent->Duration());
}

std::string tools_component;
Expand All @@ -167,7 +167,7 @@ using namespace vdrlive;
tools_component = "epginfo.epgTools";

</%cpp>
<& pageelems.epg_tt_box boxId=(epgEvent->Id()) caption=(epgEvent->Caption()) tools_comp=(tools_component) time=(start) title=(epgEvent->Title()) short_descr=(epgEvent->ShortDescr()) long_descr=(epgEvent->LongDescr()) archived=(epgEvent->Archived()) elapsed=(epgEvent->Elapsed()) filename=(epgEvent->FileName()) epgImage=(epgImage) irecording=(irecording) ievent=(i_event) iepgEvent=(i_epgEvent) &>
<& pageelems.epg_tt_box boxId=(epgEvent->Id()) caption=(epgEvent->Caption()) tools_comp=(tools_component) time=(start) title=(epgEvent->Title()) short_descr=(epgEvent->ShortDescr()) long_descr=(epgEvent->LongDescr()) archived=(epgEvent->Archived()) elapsed=(epgEvent->Elapsed()) channel=(epgEvent->ChannelName()) filename=(epgEvent->FileName()) epgImage=(epgImage) irecording=(irecording) ievent=(i_event) iepgEvent=(i_epgEvent) &>
<%cpp>
}
if (aboutBox) {
Expand Down
Loading

0 comments on commit f1740e5

Please sign in to comment.