mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
adding support for E2 picons
Origin commit data
------------------
Commit: 2c1e9952f7
Author: TangoCash <eric@loxat.de>
Date: 2018-09-09 (Sun, 09 Sep 2018)
This commit is contained in:
@@ -529,13 +529,17 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
|
||||
|
||||
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" };
|
||||
std::string fileType[] = { ".png", ".jpg", ".gif" };
|
||||
|
||||
//get channel id as string
|
||||
char strChnId[16];
|
||||
snprintf(strChnId, 16, "%llx", channel_id & 0xFFFFFFFFFFFFULL);
|
||||
strChnId[15] = '\0';
|
||||
|
||||
CZapitChannel * cc = NULL;
|
||||
if (CNeutrinoApp::getInstance()->channelList)
|
||||
cc = CNeutrinoApp::getInstance()->channelList->getChannel(channel_id);
|
||||
|
||||
for (size_t i = 0; i<(sizeof(fileType) / sizeof(fileType[0])); i++){
|
||||
std::vector<std::string> v_path;
|
||||
std::string id_tmp_path;
|
||||
@@ -550,6 +554,31 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
|
||||
id_tmp_path += strChnId + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
//create E2 filenames
|
||||
if (cc)
|
||||
{
|
||||
char fname[255];
|
||||
snprintf(fname, sizeof(fname), "1_0_%X_%X_%X_%X_%X0000_0_0_0",
|
||||
(u_int) cc->getServiceType(true),
|
||||
(u_int) channel_id & 0xFFFF,
|
||||
(u_int) (channel_id >> 32) & 0xFFFF,
|
||||
(u_int) (channel_id >> 16) & 0xFFFF,
|
||||
(u_int) cc->getSatellitePosition());
|
||||
id_tmp_path = g_settings.logo_hdd_dir + "/";
|
||||
id_tmp_path += std::string(fname) + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
|
||||
snprintf(fname, sizeof(fname), "1_0_%X_%X_%X_%X_%X0000_0_0_0",
|
||||
(u_int) 1,
|
||||
(u_int) channel_id & 0xFFFF,
|
||||
(u_int) (channel_id >> 32) & 0xFFFF,
|
||||
(u_int) (channel_id >> 16) & 0xFFFF,
|
||||
(u_int) cc->getSatellitePosition());
|
||||
id_tmp_path = g_settings.logo_hdd_dir + "/";
|
||||
id_tmp_path += std::string(fname) + fileType[i];
|
||||
v_path.push_back(id_tmp_path);
|
||||
}
|
||||
|
||||
if(g_settings.logo_hdd_dir != LOGODIR_VAR){
|
||||
//create filename with channel name (LOGODIR_VAR)
|
||||
id_tmp_path = LOGODIR_VAR "/";
|
||||
@@ -581,9 +610,7 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string&
|
||||
return true;
|
||||
}
|
||||
}
|
||||
CZapitChannel * cc = NULL;
|
||||
if (CNeutrinoApp::getInstance()->channelList)
|
||||
cc = CNeutrinoApp::getInstance()->channelList->getChannel(channel_id);
|
||||
|
||||
if (cc) {
|
||||
if (!cc->getAlternateLogo().empty())
|
||||
{
|
||||
|
Reference in New Issue
Block a user