mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
pictureviewer: add support for g_settings.lcd4l_logodir to GetLogoName() function
Origin commit data
------------------
Commit: f9cd35290a
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-12-18 (Tue, 18 Dec 2018)
Origin message was:
------------------
- pictureviewer: add support for g_settings.lcd4l_logodir to GetLogoName() function
This commit is contained in:
@@ -529,10 +529,11 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
|
||||
}
|
||||
}
|
||||
|
||||
bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &ChannelName, std::string &name, int *width, int *height)
|
||||
bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &ChannelName, std::string &name, int *width, int *height, bool lcd4l_mode)
|
||||
{
|
||||
std::string fileType[] = { ".png", ".jpg", ".gif" };
|
||||
std::vector<std::string> v_path;
|
||||
std::vector<std::string> v_file;
|
||||
|
||||
// create eventname for eventlogos; Note: We don't process channellogos if any eventlogo was found.
|
||||
std::string EventName = "";
|
||||
@@ -560,6 +561,8 @@ bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &C
|
||||
//printf("GetLogoName(): EventName \"%s\"\n", EventName.c_str());
|
||||
|
||||
v_path.clear();
|
||||
if (lcd4l_mode)
|
||||
v_path.push_back(g_settings.lcd4l_logodir);
|
||||
v_path.push_back(g_settings.logo_hdd_dir);
|
||||
if (g_settings.logo_hdd_dir != LOGODIR_VAR)
|
||||
v_path.push_back(LOGODIR_VAR);
|
||||
@@ -635,6 +638,21 @@ bool CPictureViewer::GetLogoName(const uint64_t &ChannelID, const std::string &C
|
||||
v_path.clear();
|
||||
std::string id_tmp_path;
|
||||
|
||||
if (lcd4l_mode)
|
||||
{
|
||||
v_file.clear();
|
||||
v_file.push_back(ChannelName);
|
||||
v_file.push_back(SpecialChannelName);
|
||||
v_file.push_back(strChnId);
|
||||
if (e2filename1[0] != '\0')
|
||||
v_file.push_back(std::string(e2filename1));
|
||||
if (e2filename2[0] != '\0')
|
||||
v_file.push_back(std::string(e2filename2));
|
||||
|
||||
for (size_t f = 0; f < v_file.size(); f++)
|
||||
v_path.push_back(g_settings.lcd4l_logodir + "/" + v_file[f] + fileType[i]);
|
||||
}
|
||||
|
||||
//create filename with channel name (logo_hdd_dir)
|
||||
id_tmp_path = g_settings.logo_hdd_dir + "/";
|
||||
id_tmp_path += ChannelName + fileType[i];
|
||||
|
Reference in New Issue
Block a user