mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
no absolute pathes allowed for image type 'image', path has to start with {ressourcedir}
This commit is contained in:
parent
e84c60f48a
commit
5dee1fced4
2
HISTORY
2
HISTORY
@ -38,6 +38,8 @@ Version 0.0.2
|
||||
- improved menu icon display, additionally using menu cat
|
||||
- changed devices list, device numbers start with 0
|
||||
- fixed bug that hasposter is only true if poster really exists
|
||||
- no absolute pathes allowed for image type "image", path has to start with {ressourcedir}
|
||||
|
||||
|
||||
|
||||
|
||||
|
5
config.c
5
config.c
@ -87,7 +87,6 @@ bool cDesignerConfig::GetSkin(string &skin) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void cDesignerConfig::SetChannelLogoSize(void) {
|
||||
cImageLoader imgLoader;
|
||||
imgLoader.DeterminateChannelLogoSize(logoWidth, logoHeight);
|
||||
@ -168,6 +167,10 @@ bool cDesignerConfig::OsdFontsChanged(void) {
|
||||
return changed;
|
||||
}
|
||||
|
||||
cString cDesignerConfig::GetSkinRessourcePath(void) {
|
||||
return cString::sprintf("%s%s", *skinPath, osdSkin.c_str());
|
||||
}
|
||||
|
||||
cString cDesignerConfig::CheckSlashAtEnd(std::string path) {
|
||||
try {
|
||||
if (!(path.at(path.size()-1) == '/'))
|
||||
|
1
config.h
1
config.h
@ -42,6 +42,7 @@ public:
|
||||
bool OsdSizeChanged(void);
|
||||
void SetOSDFonts(void);
|
||||
bool OsdFontsChanged(void);
|
||||
cString GetSkinRessourcePath(void);
|
||||
cString logoExtension;
|
||||
cString skinPath;
|
||||
cString logoPath;
|
||||
|
@ -1067,8 +1067,17 @@ void cTemplateFunction::ParseStringParameters(void) {
|
||||
}
|
||||
parsedText = text.str();
|
||||
|
||||
//now check further possible string variables
|
||||
string path = GetParameter(ptPath);
|
||||
if (GetNumericParameter(ptImageType) == itImage && path.size() > 0) {
|
||||
//no absolute pathes allowed
|
||||
if (!startswith(path.c_str(), "{")) {
|
||||
esyslog("skindesigner: no absolute pathes allowed for images - %s", path.c_str());
|
||||
}
|
||||
if (startswith(path.c_str(), "{ressourcedir}")) {
|
||||
imgPath = path.replace(0, 14, *config.GetSkinRessourcePath());
|
||||
}
|
||||
}
|
||||
//now check further possible string variables
|
||||
if (stringTokens && path.size() > 0 && path.find("{") != string::npos) {
|
||||
for (map < string, string >::iterator it = stringTokens->begin(); it != stringTokens->end(); it++) {
|
||||
size_t found = path.find(it->first);
|
||||
|
Loading…
Reference in New Issue
Block a user