- followscreenings: allow switchable notifications

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2019-04-28 23:55:54 +02:00
committed by Thilo Graf
parent 752e2171c7
commit f413089488
2 changed files with 9 additions and 4 deletions

View File

@@ -108,14 +108,16 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK
break; // show conflicts only once break; // show conflicts only once
} }
} }
#if 0 //ch is unused
CZapitChannel * ch = CServiceManager::getInstance()->FindChannel(channel_id);
#endif
if (g_Timerd->addRecordTimerEvent(channel_id, e->startTime, e->startTime + e->duration, e->eventID, if (g_Timerd->addRecordTimerEvent(channel_id, e->startTime, e->startTime + e->duration, e->eventID,
e->startTime, e->startTime - (ANNOUNCETIME + 120 ), apids, true, e->startTime - (ANNOUNCETIME + 120) > time(NULL), recDir, true) == -1) { e->startTime, e->startTime - (ANNOUNCETIME + 120 ), apids, true, e->startTime - (ANNOUNCETIME + 120) > time(NULL), recDir, true) == -1) {
//FIXME -- no error handling, but this shouldn't happen ... //FIXME -- no error handling, but this shouldn't happen ...
} else { } else {
if (!forwarders.empty() && (followlist.size() > 1 || g_settings.timer_followscreenings == FOLLOWSCREENINGS_ALWAYS)) if (!forwarders.empty() && (followlist.size() > 1 || g_settings.timer_followscreenings == FOLLOWSCREENINGS_ALWAYS))
forwarders[ix]->iconName_Info_right = NEUTRINO_ICON_REC; forwarders[ix]->iconName_Info_right = NEUTRINO_ICON_MARKER_RECORD;
else if (g_settings.timer_followscreenings != FOLLOWSCREENINGS_ALWAYS) //NI else if (notify && g_settings.timer_followscreenings != FOLLOWSCREENINGS_ALWAYS)
ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG,
CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO); CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO);
return menu_return::RETURN_REPAINT; return menu_return::RETURN_REPAINT;

View File

@@ -57,6 +57,8 @@ class CFollowScreenings : public CMenuTarget
CTimerd::RecordingInfo eventInfo; CTimerd::RecordingInfo eventInfo;
std::vector<CMenuForwarder *> forwarders; std::vector<CMenuForwarder *> forwarders;
void updateRightIcon(int i, time_t start, unsigned int duration); void updateRightIcon(int i, time_t start, unsigned int duration);
bool notify;
public: public:
enum enum
{ {
@@ -66,7 +68,7 @@ class CFollowScreenings : public CMenuTarget
}; };
CFollowScreenings(const t_channel_id Channel_id, time_t Starttime, time_t Stoptime, const std::string &Title, uint64_t EpgID=0, CFollowScreenings(const t_channel_id Channel_id, time_t Starttime, time_t Stoptime, const std::string &Title, uint64_t EpgID=0,
unsigned char Apids=TIMERD_APIDS_STD, bool Safety=false, std::string RecDir="", CChannelEventList *Evtlist=NULL) : CMenuTarget () { unsigned char Apids=TIMERD_APIDS_STD, bool Safety=false, std::string RecDir="", CChannelEventList *Evtlist=NULL, bool Notify = false) : CMenuTarget () {
this->channel_id = Channel_id; this->channel_id = Channel_id;
this->starttime = Starttime; this->starttime = Starttime;
this->stoptime = Stoptime; this->stoptime = Stoptime;
@@ -76,6 +78,7 @@ class CFollowScreenings : public CMenuTarget
this->title = Title; this->title = Title;
this->safety = Safety; this->safety = Safety;
this->apids = Apids; this->apids = Apids;
this->notify = Notify;
}; };
~CFollowScreenings(); ~CFollowScreenings();
CChannelEventList *getFollowScreenings(void); CChannelEventList *getFollowScreenings(void);