/pictureviewer.cpp CPictureViewer::GetLogoName: don't add the same dir twice

This commit is contained in:
Jacek Jendrzej
2014-05-26 16:55:02 +02:00
parent 3a52a97fce
commit c86ad2ef48

View File

@@ -527,6 +527,7 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
id_tmp_path += strChnId + fileType[i];
v_path.push_back(id_tmp_path);
if(g_settings.logo_hdd_dir != LOGO_FLASH_DIR_VAR){
//create filename with channel name (LOGO_FLASH_DIR_VAR)
id_tmp_path = LOGO_FLASH_DIR_VAR "/";
id_tmp_path += ChannelName + fileType[i];
@@ -536,7 +537,8 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
id_tmp_path = LOGO_FLASH_DIR_VAR "/";
id_tmp_path += strChnId + fileType[i];
v_path.push_back(id_tmp_path);
}
if(g_settings.logo_hdd_dir != LOGO_FLASH_DIR){
//create filename with channel name (LOGO_FLASH_DIR)
id_tmp_path = LOGO_FLASH_DIR "/";
id_tmp_path += ChannelName + fileType[i];
@@ -546,7 +548,7 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
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){