Project

General

Profile

Feature #1913 » add_inactive_timer_action.patch

Ludi, 01/10/2015 10:54 PM

View differences:

vdr-plugin-epgsearch-1.0.1.beta5~git20141227/epgsearchext.c 2015-01-10 22:41:34.804910994 +0100
return;
LogFile.Log(2,"analysing repeats for search timer '%s'...", search);
if (action != searchTimerActionRecord)
if ((action != searchTimerActionRecord) && (action != searchTimerActionInactiveRecord))
{
LogFile.Log(3,"search timer not set to 'record', so skip all");
return;
......
cSearchResult* pResultObj = NULL;
for (pResultObj = pResults->First(); pResultObj; pResultObj = pResults->Next(pResultObj))
{
if (action != searchTimerActionRecord) // only announce if there is no timer for the event
if ((action != searchTimerActionRecord) && (action != searchTimerActionInactiveRecord)) // only announce if there is no timer for the event
{
pResultObj->needsTimer = false;
continue;
vdr-plugin-epgsearch-1.0.1.beta5~git20141227/epgsearchext.h 2015-01-10 22:41:34.804910994 +0100
searchTimerActionAnnounceViaOSD,
searchTimerActionSwitchOnly,
searchTimerActionAnnounceAndSwitch,
searchTimerActionAnnounceViaMail
searchTimerActionAnnounceViaMail,
searchTimerActionInactiveRecord
} searchTimerAction;
class cSearchExt;
vdr-plugin-epgsearch-1.0.1.beta5~git20141227/menu_searchedit.c 2015-01-10 22:41:34.808910993 +0100
SearchTimerModes[2] = strdup(tr("Switch only"));
SearchTimerModes[3] = strdup(tr("Announce and switch"));
SearchTimerModes[4] = strdup(tr("Announce by mail"));
SearchTimerModes[5] = strdup(tr("Inactive record"));
BlacklistModes[0] = strdup(tr("only globals"));
BlacklistModes[1] = strdup(tr("Selection"));
......
Add(new cMenuEditStraItem( tr("Use as search timer"), &data.useAsSearchTimer, 3, SearchActiveModes));
if (data.useAsSearchTimer)
{
Add(new cMenuEditStraItem(IndentMenuItem(tr("Action")), &data.action, 5, SearchTimerModes));
Add(new cMenuEditStraItem(IndentMenuItem(tr("Action")), &data.action, 6, SearchTimerModes));
if (data.action == searchTimerActionSwitchOnly)
{
Add(new cMenuEditIntItem(IndentMenuItem(tr("Switch ... minutes before start")), &data.switchMinsBefore, 0, 99));
......
Add(new cMenuEditIntItem(IndentMenuItem(tr("Ask ... minutes before start")), &data.switchMinsBefore, 0, 99));
Add(new cMenuEditBoolItem(IndentMenuItem(tr("Unmute sound")), &data.unmuteSoundOnSwitch, trVDR("no"), trVDR("yes")));
}
if (data.action == searchTimerActionRecord)
if ((data.action == searchTimerActionRecord) || (data.action == searchTimerActionInactiveRecord))
{
Add(new cMenuEditBoolItem( tr(" Series recording"), &data.useEpisode, trVDR("no"), trVDR("yes")));
Add(new cMenuEditStrItem(IndentMenuItem(tr("Directory")), data.directory, sizeof(data.directory), tr(AllowedChars)));
......
Add(new cMenuEditIntItem(IndentMenuItem(trVDR("Setup.Recording$Margin at stop (min)")), &data.MarginStop, -INT_MAX, INT_MAX));
Add(new cMenuEditBoolItem(IndentMenuItem(tr("VPS")), &data.useVPS, trVDR("no"), trVDR("yes")));
}
if (data.action == searchTimerActionRecord)
if ((data.action == searchTimerActionRecord) || (data.action == searchTimerActionInactiveRecord))
{
Add(new cMenuEditStraItem(IndentMenuItem(tr("Auto delete")), &data.delMode, 3, DelModes));
if (data.delMode == 1)
vdr-plugin-epgsearch-1.0.1.beta5~git20141227/menu_searchedit.h 2015-01-10 22:41:34.808910993 +0100
char *SearchModes[6];
char *DaysOfWeek[8];
char *UseChannelSel[4];
char *SearchTimerModes[5];
char *SearchTimerModes[6];
char *BlacklistModes[4];
char *DelModes[3];
char *SearchActiveModes[3];
vdr-plugin-epgsearch-1.0.1.beta5~git20141227/searchtimer_thread.c 2015-01-10 22:41:34.808910993 +0100
continue;
// ignore manual timers if this search could modify them
if (searchExt->action == searchTimerActionRecord && TriggeredFromSearchTimerID(ti) == -1) // manual timer
if ((searchExt->action == searchTimerActionRecord || searchExt->action == searchTimerActionInactiveRecord) && TriggeredFromSearchTimerID(ti) == -1) // manual timer
continue;
if (UseVPS && ti->HasFlags(tfVps))
......
else
Flags = 1; // don't use VPS, if not set in this search
if (searchExt->action == searchTimerActionInactiveRecord)
Flags &= ~tfActive;
// already done the same timer?
if (!EPGSearchConfig.TimerProgRepeat && index == 0 && TimersDone.InList(start, stop, pEvent, -1))
{
(2-2/2)