summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-10-03 10:37:54 +0200
committerlouis <louis.braun@gmx.de>2013-10-03 10:37:54 +0200
commit4a821c98ed14954c0fc2745ff7c2b99c75d56b1f (patch)
treea02d9e59cd0981a687934ff3416165d58b785ba2 /config.c
parent1b7943aea0f17b8891f6b201ded6fadd17555972 (diff)
downloadskin-nopacity-4a821c98ed14954c0fc2745ff7c2b99c75d56b1f.tar.gz
skin-nopacity-4a821c98ed14954c0fc2745ff7c2b99c75d56b1f.tar.bz2
Added additional configurable channel logo cache
Diffstat (limited to 'config.c')
-rw-r--r--config.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/config.c b/config.c
index 4330558..b03c14b 100644
--- a/config.c
+++ b/config.c
@@ -6,6 +6,7 @@ cNopacityConfig::cNopacityConfig() {
logoPathSet = false;
epgImagePathSet = false;
iconPathSet = false;
+ pathValuesSet = false;
//Common
mainMenuEntry = false;
fontIndex = 0;
@@ -119,8 +120,6 @@ cNopacityConfig::cNopacityConfig() {
menuHeaderLogoHeight = 70;
menuItemLogoWidth = 130;
menuItemLogoHeight = 100;
- detailViewLogoWidth = 260;
- detailViewLogoHeight = 200;
timersLogoWidth = 90;
timersLogoHeight = 70;
epgImageWidth = 210;
@@ -173,6 +172,10 @@ cNopacityConfig::cNopacityConfig() {
rssFeed[2] = 0;
rssFeed[3] = 0;
rssFeed[4] = 0;
+ //Channel Logo Caching
+ limitLogoCache = 1;
+ numLogosInitial = 30;
+ numLogosMax = 50;
}
cNopacityConfig::~cNopacityConfig() {
@@ -222,14 +225,16 @@ void cNopacityConfig::setDynamicValues() {
else if (rssScrollSpeed == 2)
rssScrollFrameTime = 5;
+ if (!pathValuesSet) {
+ pathValuesSet = true;
+ logoPathDefault = cString::sprintf("%s/logos/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
+ iconPathDefault = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
+ epgImagePathDefault = cString::sprintf("%s/epgimages/", cPlugin::CacheDirectory(PLUGIN_NAME_I18N));
- logoPathDefault = cString::sprintf("%s/logos/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
- iconPathDefault = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
- epgImagePathDefault = cString::sprintf("%s/epgimages/", cPlugin::CacheDirectory(PLUGIN_NAME_I18N));
-
- dsyslog("nopacity: using Logo Directory %s", (logoPathSet)?(*logoPath):(*logoPathDefault));
- dsyslog("nopacity: using Icon Directory %s", (iconPathSet)?(*iconPath):(*iconPathDefault));
- dsyslog("nopacity: using EPG Images Directory %s", (epgImagePathSet)?(*epgImagePath):(*epgImagePathDefault));
+ dsyslog("nopacity: using Logo Directory %s", (logoPathSet)?(*logoPath):(*logoPathDefault));
+ dsyslog("nopacity: using Icon Directory %s", (iconPathSet)?(*iconPath):(*iconPathDefault));
+ dsyslog("nopacity: using EPG Images Directory %s", (epgImagePathSet)?(*epgImagePath):(*epgImagePathDefault));
+ }
}
void cNopacityConfig::loadRssFeeds(void) {
@@ -409,8 +414,6 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "menuItemLogoHeight") == 0) menuItemLogoHeight = atoi(Value);
else if (strcmp(Name, "menuHeaderLogoWidth") == 0) menuHeaderLogoWidth = atoi(Value);
else if (strcmp(Name, "menuHeaderLogoHeight") == 0) menuHeaderLogoHeight = atoi(Value);
- else if (strcmp(Name, "detailViewLogoWidth") == 0) detailViewLogoWidth = atoi(Value);
- else if (strcmp(Name, "detailViewLogoHeight") == 0) detailViewLogoHeight = atoi(Value);
else if (strcmp(Name, "timersLogoWidth") == 0) timersLogoWidth = atoi(Value);
else if (strcmp(Name, "timersLogoHeight") == 0) timersLogoHeight = atoi(Value);
else if (strcmp(Name, "epgImageWidth") == 0) epgImageWidth = atoi(Value);
@@ -462,6 +465,9 @@ bool cNopacityConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "rssFeedHeightStandalone") == 0) rssFeedHeightStandalone = atoi(Value);
else if (strcmp(Name, "fontRssFeedStandalone") == 0) fontRssFeedStandalone = atoi(Value);
else if (strcmp(Name, "rssFeedStandalonePos") == 0) rssFeedStandalonePos = atoi(Value);
+ else if (strcmp(Name, "limitLogoCache") == 0) limitLogoCache = atoi(Value);
+ else if (strcmp(Name, "numLogosInitial") == 0) numLogosInitial = atoi(Value);
+ else if (strcmp(Name, "numLogosMax") == 0) numLogosMax = atoi(Value);
else return false;
return true;