add eligible logo dir

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@996 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 8f02a26307
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-01-03 (Mon, 03 Jan 2011)

Origin message was:
------------------
-add eligible logo dir

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@996 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
Jacek Jendrzej
2011-01-03 10:41:58 +00:00
parent c1bd2a70a4
commit a397f19770
8 changed files with 34 additions and 12 deletions

View File

@@ -439,7 +439,6 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
}
#define LOGO_DIR1 "/share/tuxbox/neutrino/icons/logo"
#define LOGO_DIR2 "/var/share/icons/logo"
#define LOGO_FMT ".jpg"
bool CPictureViewer::GetLogoName(uint64_t channel_id, std::string ChannelName, std::string & name, int *width, int *height)
@@ -457,7 +456,7 @@ bool CPictureViewer::GetLogoName(uint64_t channel_id, std::string ChannelName, s
{
for (j = 0; j < 2; j++)
{
std::string tmp(LOGO_DIR2 "/" + strLogoName[i] + strLogoExt[j]);
std::string tmp(g_settings.logo_hdd_dir + "/" + strLogoName[i] + strLogoExt[j]);
if (access(tmp.c_str(), R_OK) != -1)
{
if(width && height)
@@ -489,10 +488,10 @@ bool CPictureViewer::DisplayLogo (uint64_t channel_id, int posx, int posy, int w
char fname[255];
bool ret = false;
sprintf(fname, "%s/%llx.jpg", LOGO_DIR2, channel_id & 0xFFFFFFFFFFFFULL);
sprintf(fname, "%s/%llx.jpg", g_settings.logo_hdd_dir.c_str(), channel_id & 0xFFFFFFFFFFFFULL);
printf("logo file: %s\n", fname);
if(access(fname, F_OK))
sprintf(fname, "%s/%llx.gif", LOGO_DIR2, channel_id & 0xFFFFFFFFFFFFULL);
sprintf(fname, "%s/%llx.gif", g_settings.logo_hdd_dir.c_str(), channel_id & 0xFFFFFFFFFFFFULL);
if(!access(fname, F_OK)) {
ret = DisplayImage(fname, posx, posy, width, height);