summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epgsearch.cpp15
-rw-r--r--epgsearch.h2
-rw-r--r--pages/menu.ecpp5
-rw-r--r--pages/schedule.ecpp3
-rw-r--r--pages/whats_on.ecpp5
-rw-r--r--setup.cpp5
-rw-r--r--setup.h2
7 files changed, 18 insertions, 19 deletions
diff --git a/epgsearch.cpp b/epgsearch.cpp
index 468e0a7..cd56605 100644
--- a/epgsearch.cpp
+++ b/epgsearch.cpp
@@ -6,6 +6,7 @@
#include "epgsearch/services.h"
#include "epgsearch.h"
#include "exception.h"
+#include "livefeatures.h"
#include "tools.h"
namespace vdrlive {
@@ -25,12 +26,14 @@ bool operator<( SearchTimer const& left, SearchTimer const& right )
bool CheckEpgsearchVersion()
{
- cPlugin* epgsearch = cPluginManager::GetPlugin("epgsearch");
- if (!epgsearch) return false;
- char minVersion[] = "0.9.22";
- if (string(epgsearch->Version()) < string(minVersion))
- throw HtmlError( tr("Required minimum version of epgsearch: ") + string(minVersion));
- return true;
+ /* @winni: Falls Du an der Versionsnummer Anpassungen vornehmen willst, mach das bitte in livefeatures.h ganz unten. Danke */
+ Features< features::epgsearch >& f = LiveFeatures< features::epgsearch >();
+ if ( f.Loaded() ) {
+ if ( !f.Recent() )
+ throw HtmlError( tr("Required minimum version of epgsearch: ") + string( f.MinVersion() ));
+ return true;
+ }
+ return false;
}
SearchTimer::SearchTimer()
diff --git a/epgsearch.h b/epgsearch.h
index 3b23ef3..be8bf0c 100644
--- a/epgsearch.h
+++ b/epgsearch.h
@@ -14,8 +14,6 @@ class SearchTimer;
bool operator<( SearchTimer const& left, SearchTimer const& right );
-bool CheckEpgsearchVersion();
-
class SearchTimer
{
public:
diff --git a/pages/menu.ecpp b/pages/menu.ecpp
index 2791b2d..e94e885 100644
--- a/pages/menu.ecpp
+++ b/pages/menu.ecpp
@@ -2,6 +2,7 @@
#include <string>
#include <vdr/plugin.h>
#include <vdr/config.h>
+#include "livefeatures.h"
#include "setup.h"
using namespace std;
@@ -34,7 +35,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<a href="whats_on.html?type=now" <& menu.setactive current=("whats_on") &>><$ tr("What's on?") $></a> |
<a href="schedule.html" <& menu.setactive current=("schedule") &>><$ tr("Schedule") $></a> |
<a href="timers.html" <& menu.setactive current=("timers") &>><$ tr("Timers") $></a> |
-% if (LiveSetup().HaveEPGSearch()) {
+% if ( LiveFeatures< features::epgsearch >().Recent() ) {
<a href="searchepg.html" <& menu.setactive current=("searchepg") &>><$ tr("Search") $></a> |
<a href="searchtimers.html" <& menu.setactive current=("searchtimers") &>><$ tr("Searchtimers") $></a> |
% }
@@ -56,7 +57,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<& menu.component current=("whats_on") &>
<& menu.component current=("schedule") &>
<& menu.component current=("timers") &>
-% if (LiveSetup().HaveEPGSearch()) {
+% if ( LiveFeatures< features::epgsearch >().Recent() ) {
<& menu.component current=("search") &>
<& menu.component current=("searchtimers") &>
% }
diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp
index a02c32c..5357b3d 100644
--- a/pages/schedule.ecpp
+++ b/pages/schedule.ecpp
@@ -4,6 +4,7 @@
#include <vdr/epg.h>
#include <vdr/config.h>
#include "exception.h"
+#include "livefeatures.h"
#include "setup.h"
#include "tools.h"
#include "epg_events.h"
@@ -107,7 +108,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
% }
<tr class="<? active_line ? "active" ?>">
<td style="border-left: 1px solid black"><& pageelems.event_timer channelid=(channel_id) eventid=(event) &>
-% if (LiveSetup().HaveEPGSearch()) {
+% if ( LiveFeatures< features::epgsearch >().Recent() ) {
<a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="/search.png" border="0" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a>
% }
<a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="imdb.png" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a>
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index 0b274e1..bbbb73b 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -4,6 +4,7 @@
#include <vdr/epg.h>
#include <vdr/config.h>
#include <vdr/i18n.h>
+#include "livefeatures.h"
#include "setup.h"
#include "tools.h"
#include "epg_events.h"
@@ -136,7 +137,7 @@ if (type == "now") {
% if (type == "now") {
<& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channel_id) image="zap.png" alt="" &>
% }
-% if (LiveSetup().HaveEPGSearch()) {
+% if ( LiveFeatures< features::epgsearch >().Recent() ) {
<a href="searchresults.html?searchplain=<$ StringEscapeAndBreak(epgEvent->Title()) $>"><img src="search.png" border="0" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a>
% }
<a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(epgEvent->Title()) $>"><img src="imdb.png" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a>
@@ -159,7 +160,7 @@ if (type == "now") {
% if (type == "now") {
<& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channel_id) image="zap.png" alt="" &>
% }
-% if (LiveSetup().HaveEPGSearch()) {
+% if ( LiveFeatures< features::epgsearch >().Recent() ) {
<a href="searchresults.html?searchplain=<$ StringUrlEncode(epgEvent->Title()) $>"><img src="/search.png" border="0" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a>
% }
<a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(epgEvent->Title()) $>"><img src="imdb.png" border="0" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a>
diff --git a/setup.cpp b/setup.cpp
index e2cde21..74d853a 100644
--- a/setup.cpp
+++ b/setup.cpp
@@ -106,11 +106,6 @@ bool Setup::CheckServerIps()
return true;
}
-bool Setup::HaveEPGSearch(void)
-{
- return cPluginManager::GetPlugin("epgsearch") != NULL;
-}
-
std::string Setup::GetMD5HashAdminPassword() const
{
// format is <length>:<md5-hash of password>
diff --git a/setup.h b/setup.h
index 382106d..8c35c5c 100644
--- a/setup.h
+++ b/setup.h
@@ -53,7 +53,7 @@ public:
char const* CommandLineHelp() const;
bool ParseSetupEntry( char const* name, char const* value );
- bool HaveEPGSearch(void);
+
private:
Setup();
Setup( Setup const& );