diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-11-19 18:53:09 +0100 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-11-19 18:53:09 +0100 |
commit | a5c871c47c721e1179bee7c4695169dd3344c0c2 (patch) | |
tree | c99be1c122c7ba57791ff68c512b661125acbcb6 /pages | |
parent | da560175d35965dbca9856f7192e0da172fa7d32 (diff) | |
download | vdr-plugin-live-a5c871c47c721e1179bee7c4695169dd3344c0c2.tar.gz vdr-plugin-live-a5c871c47c721e1179bee7c4695169dd3344c0c2.tar.bz2 |
new setup option to display channels without EPG
Diffstat (limited to 'pages')
-rw-r--r-- | pages/pageelems.ecpp | 17 | ||||
-rw-r--r-- | pages/setup.ecpp | 19 | ||||
-rw-r--r-- | pages/whats_on.ecpp | 15 |
3 files changed, 38 insertions, 13 deletions
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index e8dd1fb..9222115 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -266,7 +266,7 @@ int update_status(1); <& pageelems.event_timer epgid=(epgid) &> <& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &> <%cpp> - if (LiveFeatures<features::epgsearch>().Recent()) { + if (LiveFeatures<features::epgsearch>().Recent() && eventId != 0) { </%cpp> <a href="searchresults.html?searchplain=<$ StringEscapeAndBreak(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a> <%cpp> @@ -276,18 +276,27 @@ int update_status(1); <& pageelems.vlc_stream_channel channelId=(channelId) &> <%cpp> } + if (eventId != 0) { </%cpp> - <& pageelems.imdb_info_href title=(title) &> + <& pageelems.imdb_info_href title=(title) &> <%cpp> + } } else { // table output </%cpp> <td class="action leftcol <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.event_timer epgid=(epgid) &></td> <td class="action <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &></td> - <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent()) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td> + <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent() && eventId != 0) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td> <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"?>"><& pageelems.imdb_info_href title=(title) &></td> + <td class="action <? lastCurrentChanel ? "bottomrow"?>"> +<%cpp> + if (eventId != 0) { +</%cpp> + <& pageelems.imdb_info_href title=(title) &> <%cpp> + } +</%cpp> </td> +<%cpp> } </%cpp> </%def> diff --git a/pages/setup.ecpp b/pages/setup.ecpp index d89acf0..cc1db8c 100644 --- a/pages/setup.ecpp +++ b/pages/setup.ecpp @@ -23,6 +23,7 @@ using namespace std; string showInfoBox; string useStreamdev; string showIMDb; + string showChannelsWithoutEPG; string streamdevport; string streamdevtype; int authchanged = 0; @@ -65,6 +66,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); LiveSetup().SetStreamdevPort(streamdevport.empty() ? 3000 : lexical_cast<int>(streamdevport)); LiveSetup().SetStreamdevType(streamdevtype.empty() ? "PES" : streamdevtype); LiveSetup().SetShowIMDb(!showIMDb.empty()); + LiveSetup().SetShowChannelsWithoutEPG(!showChannelsWithoutEPG.empty()); LiveSetup().SaveSetup(); message = tr("Setup saved."); } @@ -89,7 +91,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); streamdevport = lexical_cast<std::string, int>(LiveSetup().GetStreamdevPort()); streamdevtype = LiveSetup().GetStreamdevType(); showIMDb = LiveSetup().GetShowIMDb() ? "1" : ""; - + showChannelsWithoutEPG = LiveSetup().GetShowChannelsWithoutEPG() ? "1" : ""; </%cpp> <& pageelems.doc_type &> <html> @@ -136,10 +138,6 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <td class="toprow leftcol rightcol" colspan="2"><div class="boxheader"><div><div><$ tr("Setup") $></div></div></div></td> </tr> <tr> - <td class="label leftcol"><div class="withmargin"><$ tr("Last channel to display") $>:</div></td> - <td class="rightcol"><input type="text" name="lastchannel" value="<$ lastchannel $>" id="lastchannel" /></td> - </tr> - <tr> <td class="label leftcol"><div class="withmargin"><$ tr("Use authentication") $>:</div></td> <td class="rightcol"> <input type="checkbox" name="useauth" id="useauth" value="1" <%cpp> CHECKIF(useauth); </%cpp> onclick="changeduseauth(this)"/> @@ -212,11 +210,22 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); </td> </tr> <tr> + <td class="label leftcol"><div class="withmargin"><$ tr("Last channel to display") $>:</div></td> + <td class="rightcol"><input type="text" name="lastchannel" value="<$ lastchannel $>" id="lastchannel" /></td> + </tr> + <tr> <td class="label leftcol"><div class="withmargin"><$ tr("additional fixed times in 'What's on?'") $>:</div></td> <td class="rightcol"><input type="text" name="times" value="<$ times $>" id="times" /> <& tooltip.help text=(tr("Format is HH:MM. Separate multiple times with a semicolon")) &></td> </tr> <tr> + <td class="label leftcol"><div class="withmargin"><$ tr("Show channels without EPG") $>:</div></td> + <td class="rightcol"> + <input type="checkbox" name="showChannelsWithoutEPG" id="showChannelsWithoutEPG" value="1" <%cpp> CHECKIF(!showChannelsWithoutEPG.empty()); </%cpp>/> + </td> + </tr> + + <tr> <td class="label leftcol"><div class="withmargin"><$ tr("Start page") $>:</div></td> <td class="rightcol"><select name="startscreen" size="1" id="startscreen"> <option value="whatsonnow" <%cpp> SELECTIF(startscreen == "whatsonnow") </%cpp>><$ trVDR("What's on now?") $></option> diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index 736d0ba..51312a1 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -129,9 +129,8 @@ if (type == "now") { Event = Schedule->GetFollowingEvent(); else if (type == "at") Event = Schedule->GetEventAround(seektime); - if (!Event) { - continue; - } + + if (!Event && !LiveSetup().GetShowChannelsWithoutEPG()) continue; EpgInfoPtr epgEvent = EpgEvents::CreateEpgInfo(Channel, Event); eventList.push_back(epgEvent); @@ -197,6 +196,9 @@ if (type == "now") { } else { // mode == "list" std::list<EpgInfoPtr>::iterator last = i; bool lastCurrentChanel = (++last == eventList.end()); + tChannelID chanId; + 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) &> @@ -209,11 +211,16 @@ if (type == "now") { </div> </td> <td class="topaligned <? lastCurrentChanel ? "bottomrow"?>"> - <div class="more withmargin"><a + <div class="more withmargin"> +% if (eventId != 0) { + <a % if (!longDescription.empty()) { <& tooltip.hint text=(longDescription) &><& tooltip.display domId=(epgEvent->Id()) &> % } ><span class="title"><$ (epgEvent->Title()) $></span><br /><span class="short"><$ (epgEvent->ShortDescr()) $></span></a> +% } else { + <span class="title"><$ (epgEvent->Title()) $></span> +% } </div> </td> <td class="topaligned rightcol <? lastCurrentChanel ? "bottomrow"?>"><div class="station withmargin"><a href="schedule.html?channel=<$ chNumber $>" <& tooltip.hint text=(tr("View the schedule of this channel")) &>><$ (epgEvent->Caption()) $></a></div> |