mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
pictureviewer: readd fallback to the std logo directory in flash
Origin commit data
------------------
Commit: 50ee98c3c9
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-10-07 (Mon, 07 Oct 2013)
Origin message was:
------------------
- pictureviewer: readd fallback to the std logo directory in flash
This commit is contained in:
@@ -498,6 +498,8 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
|
||||
}
|
||||
}
|
||||
|
||||
#define LOGO_FLASH_DIR DATADIR "/neutrino/icons/logo"
|
||||
|
||||
bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string& ChannelName, std::string & name, int *width, int *height)
|
||||
{
|
||||
std::string fileType[] = { ".png", ".jpg" , ".gif" };
|
||||
@@ -511,16 +513,26 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
|
||||
std::vector<std::string> v_path;
|
||||
std::string id_tmp_path;
|
||||
|
||||
//create filename with channel name
|
||||
//create filename with channel name (logo_hdd_dir)
|
||||
id_tmp_path = g_settings.logo_hdd_dir + "/";
|
||||
id_tmp_path += ChannelName + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
//create filename with id
|
||||
|
||||
//create filename with id (logo_hdd_dir)
|
||||
id_tmp_path = g_settings.logo_hdd_dir + "/";
|
||||
id_tmp_path += strChnId + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
//create filename with channel name (LOGO_FLASH_DIR)
|
||||
id_tmp_path = LOGO_FLASH_DIR "/";
|
||||
id_tmp_path += ChannelName + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
//create filename with id (LOGO_FLASH_DIR)
|
||||
id_tmp_path = LOGO_FLASH_DIR "/";
|
||||
id_tmp_path += strChnId + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
//check if file is available, name with real name is preferred, return true on success
|
||||
for (size_t j = 0; j < v_path.size(); j++){
|
||||
if (access(v_path[j].c_str(), R_OK) != -1){
|
||||
|
Reference in New Issue
Block a user