summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/whats_on.ecpp7
-rw-r--r--setup.cpp5
-rw-r--r--setup.h4
3 files changed, 13 insertions, 3 deletions
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index bbbb73b..d537262 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -15,7 +15,7 @@ using namespace vdrlive;
</%pre>
<%args>
type = "now";
-mode = "detail";
+string mode;
string attime;
string fixtime;
@@ -43,6 +43,11 @@ string head;
time_t seektime = 0;
string displaytime;
+if (mode.empty())
+ mode = LiveSetup().GetLastWhatsOnListMode();
+else
+ LiveSetup().SetLastWhatsOnListMode(mode);
+
current_type = type;
current_mode = mode;
current_attime = attime;
diff --git a/setup.cpp b/setup.cpp
index 08f808b..4e9291b 100644
--- a/setup.cpp
+++ b/setup.cpp
@@ -26,7 +26,8 @@ Setup::Setup():
m_lastChannel( 0 ),
m_screenshotInterval( 1000 ),
m_useAuth( 1 ),
- m_adminLogin("admin")
+ m_adminLogin("admin"),
+ m_lastwhatsonlistmode("detail")
{
m_adminPasswordMD5 = "4:" + MD5Hash("live");
liveplugin = cPluginManager::GetPlugin("live");
@@ -77,6 +78,7 @@ bool Setup::ParseSetupEntry( char const* name, char const* value )
else if ( strcmp( name, "UserdefTimes" ) == 0 ) m_times = value;
else if ( strcmp( name, "StartPage" ) == 0 ) m_startscreen = value;
else if ( strcmp( name, "LocalNetMask" ) == 0 ) { m_localnetmask = value; }
+ else if ( strcmp( name, "LastWhatsOnListMode" ) == 0 ) { m_lastwhatsonlistmode = value; }
else return false;
return true;
}
@@ -198,6 +200,7 @@ bool Setup::SaveSetup()
}
liveplugin->SetupStore("UserdefTimes", m_times.c_str());
liveplugin->SetupStore("StartPage", m_startscreen.c_str());
+ liveplugin->SetupStore("LastWhatsOnListMode", m_lastwhatsonlistmode.c_str());
return true;
}
diff --git a/setup.h b/setup.h
index 9f4b8b5..b4db7c1 100644
--- a/setup.h
+++ b/setup.h
@@ -41,6 +41,7 @@ public:
std::string GetStartScreenLink() const;
std::string GetLocalNetMask() const { return m_localnetmask; };
bool GetIsLocalNet() const { return m_islocalnet; };
+ std::string GetLastWhatsOnListMode() const { return m_lastwhatsonlistmode; }
void SetLastChannel(int lastChannel) { m_lastChannel = lastChannel; }
void SetAdminLogin(std::string login) { m_adminLogin = login; }
@@ -51,7 +52,7 @@ public:
void SetStartScreen(std::string startscreen) { m_startscreen = startscreen; }
void SetLocalNetMask(std::string localnetmask) { m_localnetmask = localnetmask; }
void SetIsLocalNet(bool islocalnet) { m_islocalnet = islocalnet; }
-
+ void SetLastWhatsOnListMode(std::string mode) { m_lastwhatsonlistmode = mode; SaveSetup(); }
bool SaveSetup();
bool ParseCommandLine( int argc, char* argv[] );
@@ -81,6 +82,7 @@ private:
std::string m_startscreen;
std::string m_localnetmask;
bool m_islocalnet;
+ std::string m_lastwhatsonlistmode;
bool CheckServerPort();
bool CheckServerIps();