add special logo names support

Origin commit data
------------------
Branch: ni/coolstream
Commit: 8915440aa6
Author: TangoCash <eric@loxat.de>
Date: 2018-12-18 (Tue, 18 Dec 2018)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2018-12-18 00:19:35 +01:00
committed by vanhofen
parent 80f47013a3
commit 1a16fb341a
2 changed files with 26 additions and 0 deletions

View File

@@ -542,6 +542,16 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
char e2filename2[255];
e2filename2[0] = '\0';
//create special filename from channelname
std::string SpecialChannelName = ChannelName;
std::transform(SpecialChannelName.begin(), SpecialChannelName.end(), SpecialChannelName.begin(), ::tolower);
SpecialChannelName = str_replace(" ","-",SpecialChannelName);
SpecialChannelName = str_replace("ä","a",SpecialChannelName);
SpecialChannelName = str_replace("ö","o",SpecialChannelName);
SpecialChannelName = str_replace("ü","u",SpecialChannelName);
SpecialChannelName = str_replace("+","___plus___",SpecialChannelName);
SpecialChannelName = str_replace("&","___and___",SpecialChannelName);
CZapitChannel * cc = NULL;
if (channel_id)
if (CNeutrinoApp::getInstance()->channelList)
@@ -575,6 +585,11 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
id_tmp_path += ChannelName + fileType[i];
v_path.push_back(id_tmp_path);
//create filename with special channel name (logo_hdd_dir)
id_tmp_path = g_settings.logo_hdd_dir + "/";
id_tmp_path += SpecialChannelName + fileType[i];
v_path.push_back(id_tmp_path);
//create filename with id (logo_hdd_dir)
id_tmp_path = g_settings.logo_hdd_dir + "/";
id_tmp_path += strChnId + fileType[i];
@@ -602,6 +617,11 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
id_tmp_path += ChannelName + fileType[i];
v_path.push_back(id_tmp_path);
//create filename with special channel name (LOGODIR_VAR)
id_tmp_path = LOGODIR_VAR "/";
id_tmp_path += SpecialChannelName + fileType[i];
v_path.push_back(id_tmp_path);
//create filename with id (LOGODIR_VAR)
id_tmp_path = LOGODIR_VAR "/";
id_tmp_path += strChnId + fileType[i];
@@ -629,6 +649,11 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
id_tmp_path += ChannelName + fileType[i];
v_path.push_back(id_tmp_path);
//create filename with special channel name (LOGODIR)
id_tmp_path = LOGODIR "/";
id_tmp_path += SpecialChannelName + fileType[i];
v_path.push_back(id_tmp_path);
//create filename with id (LOGODIR)
id_tmp_path = LOGODIR "/";
id_tmp_path += strChnId + fileType[i];

View File

@@ -26,6 +26,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <algorithm>
#include <string>
#include <vector>
#include <stdio.h> /* printf */