summaryrefslogtreecommitdiff
path: root/live.cpp
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2012-12-26 19:49:43 +0100
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2012-12-26 19:49:43 +0100
commit6c10da93f171ec7fbff5fe7f9597b6be4f1501c5 (patch)
tree9522e849628fba0c89d5cb8919e273fe3494d7a7 /live.cpp
parent320a053f329f39bd416cba3b7508e6ed570853a2 (diff)
downloadvdr-plugin-live-6c10da93f171ec7fbff5fe7f9597b6be4f1501c5.tar.gz
vdr-plugin-live-6c10da93f171ec7fbff5fe7f9597b6be4f1501c5.tar.bz2
Adds support for the newly introduced ResourceDirectory.
This is taken from a patch provided in ticket #1064.
Diffstat (limited to 'live.cpp')
-rw-r--r--live.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/live.cpp b/live.cpp
index dfe380d..653c6a6 100644
--- a/live.cpp
+++ b/live.cpp
@@ -4,6 +4,7 @@
* See the README file for copyright information and how to reach the author.
*/
+#include <vdr/config.h>
#include <vdr/plugin.h>
#include "i18n.h"
#include "live.h"
@@ -23,6 +24,9 @@ const char *Plugin::VERSION = LIVEVERSION;
const char *Plugin::DESCRIPTION = LIVESUMMARY;
std::string Plugin::m_configDirectory;
+#if APIVERSNUM > 10729
+std::string Plugin::m_resourceDirectory;
+#endif
cUsers Users;
@@ -43,6 +47,9 @@ bool Plugin::ProcessArgs(int argc, char *argv[])
bool Plugin::Start(void)
{
m_configDirectory = canonicalize_file_name(cPlugin::ConfigDirectory( PLUGIN_NAME_I18N ));
+#if APIVERSNUM > 10729
+ m_resourceDirectory = canonicalize_file_name(cPlugin::ResourceDirectory( PLUGIN_NAME_I18N ));
+#endif
#if VDRVERSNUM < 10507
RegisterI18n( vdrlive::Phrases );
@@ -51,7 +58,11 @@ bool Plugin::Start(void)
LiveStatusMonitor();
// preload files into file Cache
+#if APIVERSNUM > 10729
+ PreLoadFileCache(m_resourceDirectory);
+#else
PreLoadFileCache(m_configDirectory);
+#endif
// load users
Users.Load(AddDirectory(m_configDirectory.c_str(), "users.conf"), true);