mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
show event logos only in infoviewer
This commit is contained in:
@@ -407,6 +407,7 @@ void CComponentsChannelLogo::init(const uint64_t& channelId, const std::string&
|
||||
alt_pic_name = "";
|
||||
setChannel(channelId, channelName);
|
||||
do_scale = allow_scale;
|
||||
enable_event_logo = false;
|
||||
}
|
||||
void CComponentsChannelLogo::setAltLogo(const std::string& picture_name)
|
||||
{
|
||||
@@ -444,7 +445,7 @@ void CComponentsChannelLogo::setChannel(const uint64_t& channelId, const std::st
|
||||
|
||||
int dummy;
|
||||
|
||||
has_logo = g_PicViewer->GetLogoName(channel_id, channel_name, image, &dummy, &dummy);
|
||||
has_logo = g_PicViewer->GetLogoName(channel_id, channel_name, image, &dummy, &dummy, false, enable_event_logo);
|
||||
|
||||
if (!has_logo)//no logo was found, use altrenate icon or logo
|
||||
image = alt_pic_name;
|
||||
|
@@ -200,7 +200,10 @@ class CComponentsChannelLogo : public CComponentsPicture
|
||||
uint64_t channel_id;
|
||||
///channel name
|
||||
std::string channel_name;
|
||||
|
||||
|
||||
///mode of event logo
|
||||
bool enable_event_logo;
|
||||
|
||||
///alternate image file, if no channel logo is available
|
||||
std::string alt_pic_name;
|
||||
|
||||
@@ -250,7 +253,11 @@ class CComponentsChannelLogo : public CComponentsPicture
|
||||
void setAltLogo(const std::string& picture_name);
|
||||
///set an alternate logo if no logo is available, NOTE: value of has_logo will set to true
|
||||
void setAltLogo(const char* picture_name);
|
||||
|
||||
|
||||
///enable/disable eventlogo
|
||||
void enableEventLogo(bool enable = true){enable_event_logo = enable;}
|
||||
void disableEventLogo(){enableEventLogo(false);}
|
||||
|
||||
///returns true, if any logo is available, also if an alternate logo was setted
|
||||
bool hasLogo(){return has_logo;};
|
||||
|
||||
|
Reference in New Issue
Block a user