Channelgroup in cRecMenuSearchTimerEdit

This commit is contained in:
kamel5 2019-04-09 18:25:58 +02:00
parent 333a3d397f
commit 6e83787437
14 changed files with 160 additions and 25 deletions

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-07 14:23+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-21 17:49+0200\n" "PO-Revision-Date: 2013-09-21 17:49+0200\n"
"Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n" "Last-Translator: My friend <Sampep> Thanks David <Gabychan> <gbonich@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -366,6 +366,9 @@ msgstr "Inicia canal"
msgid "Stop Channel" msgid "Stop Channel"
msgstr "Atura canal" msgstr "Atura canal"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "Comença després" msgstr "Comença després"
@ -525,6 +528,12 @@ msgstr "coincidència exacta"
msgid "regular expression" msgid "regular expression"
msgstr "expressió regular" msgstr "expressió regular"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Preferències" msgstr "Preferències"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-07 14:23+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: Horst\n" "Last-Translator: Horst\n"
"Language-Team: \n" "Language-Team: \n"
@ -363,6 +363,9 @@ msgstr "Startkanal"
msgid "Stop Channel" msgid "Stop Channel"
msgstr "Stopkanal" msgstr "Stopkanal"
msgid "Channel Group"
msgstr "Kanalgruppe"
msgid "Start after" msgid "Start after"
msgstr "Beginn nach" msgstr "Beginn nach"
@ -522,6 +525,12 @@ msgstr "exakt"
msgid "regular expression" msgid "regular expression"
msgstr "Regulärer Ausdruck" msgstr "Regulärer Ausdruck"
msgid "Interval"
msgstr "Bereich"
msgid "only FTA"
msgstr "ohne PayTV"
msgid "General Settings" msgid "General Settings"
msgstr "Allgemeine Einstellungen" msgstr "Allgemeine Einstellungen"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 0.0.1\n" "Project-Id-Version: vdr-tvguide 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-07 14:23+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2012-08-25 17:49+0200\n" "PO-Revision-Date: 2012-08-25 17:49+0200\n"
"Last-Translator: fiveten_59\n" "Last-Translator: fiveten_59\n"
"Language-Team: \n" "Language-Team: \n"
@ -363,6 +363,9 @@ msgstr "Avvia il Canale"
msgid "Stop Channel" msgid "Stop Channel"
msgstr "Ferma il Canale" msgstr "Ferma il Canale"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "Avvia dopo" msgstr "Avvia dopo"
@ -522,6 +525,12 @@ msgstr "exakt"
msgid "regular expression" msgid "regular expression"
msgstr "Regulärer Ausdruck" msgstr "Regulärer Ausdruck"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Allgemeine Einstellungen" msgstr "Allgemeine Einstellungen"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 1.0.0\n" "Project-Id-Version: vdr-tvguide 1.0.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-07 14:23+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-25 17:49+0400\n" "PO-Revision-Date: 2013-09-25 17:49+0400\n"
"Last-Translator: AmiD, ilya\n" "Last-Translator: AmiD, ilya\n"
"Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n" "Language-Team: Russia-Cherepovets(wm.amid@gmail.com)\n"
@ -363,6 +363,9 @@ msgstr "С канала"
msgid "Stop Channel" msgid "Stop Channel"
msgstr "По канал" msgstr "По канал"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "С" msgstr "С"
@ -522,6 +525,12 @@ msgstr "точное совпадение"
msgid "regular expression" msgid "regular expression"
msgstr "регулярные выражения" msgstr "регулярные выражения"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "Основные настройки" msgstr "Основные настройки"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: vdr-tvguide 1.1.0\n" "Project-Id-Version: vdr-tvguide 1.1.0\n"
"Report-Msgid-Bugs-To: <see README>\n" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2019-04-07 14:23+0200\n" "POT-Creation-Date: 2019-04-12 14:35+0200\n"
"PO-Revision-Date: 2013-09-15 00:12+0100\n" "PO-Revision-Date: 2013-09-15 00:12+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -363,6 +363,9 @@ msgstr "Od kan
msgid "Stop Channel" msgid "Stop Channel"
msgstr "Po kanál" msgstr "Po kanál"
msgid "Channel Group"
msgstr ""
msgid "Start after" msgid "Start after"
msgstr "Zaèiatok po" msgstr "Zaèiatok po"
@ -522,6 +525,12 @@ msgstr "presn
msgid "regular expression" msgid "regular expression"
msgstr "regulárny výraz" msgstr "regulárny výraz"
msgid "Interval"
msgstr ""
msgid "only FTA"
msgstr ""
msgid "General Settings" msgid "General Settings"
msgstr "V¹eobecné nastavenia" msgstr "V¹eobecné nastavenia"

View File

@ -495,6 +495,22 @@ void cRecManager::GetSearchTimers(std::vector<cTVGuideSearchTimer> *searchTimer)
std::sort(searchTimer->begin(), searchTimer->end()); std::sort(searchTimer->begin(), searchTimer->end());
} }
void cRecManager::GetChannelGroups(std::vector<std::string> *channelGroups) {
if (!epgSearchAvailable) {
return;
}
Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1;
if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) {
std::list<std::string> channelGroupList;
channelGroupList = epgSearch->handler->ChanGrpList();
for (std::list<std::string>::iterator it = channelGroupList.begin(); it != channelGroupList.end(); it++) {
channelGroups->push_back(*it);
}
}
std::sort(channelGroups->begin(), channelGroups->end());
}
int cRecManager::CreateSearchTimer(std::string epgSearchString) { int cRecManager::CreateSearchTimer(std::string epgSearchString) {
int timerID = -1; int timerID = -1;
if (!epgSearchAvailable) if (!epgSearchAvailable)

View File

@ -46,6 +46,7 @@ public:
const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults); const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults);
void ReadEPGSearchTemplates(std::vector<TVGuideEPGSearchTemplate> *epgTemplates); void ReadEPGSearchTemplates(std::vector<TVGuideEPGSearchTemplate> *epgTemplates);
void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers); void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers);
void GetChannelGroups(std::vector<std::string> *channelGroups);
int CreateSearchTimer(std::string epgSearchString); int CreateSearchTimer(std::string epgSearchString);
bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer); bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer);
void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers); void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers);

View File

@ -493,7 +493,8 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
int initialVal, int initialVal,
bool active, bool active,
int *callback, int *callback,
eRecMenuState action) { eRecMenuState action,
bool refresh) {
selectable = true; selectable = true;
this->text = text; this->text = text;
strings = Strings; strings = Strings;
@ -504,6 +505,7 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
this->currentVal = initialVal; this->currentVal = initialVal;
this->active = active; this->active = active;
this->callback = callback; this->callback = callback;
this->refresh = refresh;
this->action = action; this->action = action;
height = 3 * font->Height() / 2; height = 3 * font->Height() / 2;
pixmapVal = NULL; pixmapVal = NULL;
@ -571,6 +573,9 @@ eRecMenuState cRecMenuItemSelect::ProcessKey(eKeys Key) {
if (callback) if (callback)
*callback = currentVal; *callback = currentVal;
DrawValue(); DrawValue();
if (refresh)
return rmsRefresh;
else
return rmsConsumed; return rmsConsumed;
break; break;
case kRight: case kRight:
@ -578,6 +583,9 @@ eRecMenuState cRecMenuItemSelect::ProcessKey(eKeys Key) {
if (callback) if (callback)
*callback = currentVal; *callback = currentVal;
DrawValue(); DrawValue();
if (refresh)
return rmsRefresh;
else
return rmsConsumed; return rmsConsumed;
break; break;
case kOk: case kOk:

View File

@ -247,6 +247,7 @@ private:
cString text; cString text;
int currentVal; int currentVal;
int *callback; int *callback;
bool refresh;
std::vector<std::string> strings; std::vector<std::string> strings;
int numValues; int numValues;
cPixmap *pixmapVal; cPixmap *pixmapVal;
@ -257,7 +258,8 @@ public:
int initialVal, int initialVal,
bool active = false, bool active = false,
int *callback = NULL, int *callback = NULL,
eRecMenuState action = rmsNotConsumed); eRecMenuState action = rmsNotConsumed,
bool refresh = false);
virtual ~cRecMenuItemSelect(void); virtual ~cRecMenuItemSelect(void);
void SetPixmaps(void); void SetPixmaps(void);
void Hide(void); void Hide(void);

View File

@ -311,7 +311,9 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
if (epgSearchTemplates.size() > 0) { if (epgSearchTemplates.size() > 0) {
activeMenu = new cRecMenuSearchTimerTemplates(searchTimer, epgSearchTemplates); activeMenu = new cRecMenuSearchTimerTemplates(searchTimer, epgSearchTemplates);
} else { } else {
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, false); std::vector<std::string> channelGroups;
recManager->GetChannelGroups(&channelGroups);
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, false, channelGroups);
} }
} }
activeMenu->Display(); activeMenu->Display();
@ -334,7 +336,9 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
searchTimer = menu->GetSearchTimer(); searchTimer = menu->GetSearchTimer();
} else break; } else break;
delete activeMenu; delete activeMenu;
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, advancedOptions); std::vector<std::string> channelGroups;
recManager->GetChannelGroups(&channelGroups);
activeMenu = new cRecMenuSearchTimerEdit(searchTimer, advancedOptions, channelGroups);
activeMenu->Display(); activeMenu->Display();
break; } break; }
case rmsSearchTimerTest: { case rmsSearchTimerTest: {

View File

@ -722,10 +722,11 @@ int cRecMenuSearchTimers::GetTotalNumMenuItems(void) {
} }
// --- cRecMenuSearchTimerEdit --------------------------------------------------------- // --- cRecMenuSearchTimerEdit ---------------------------------------------------------
cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions) { cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions, std::vector<std::string> channelGroups) {
deleteMenuItems = false; deleteMenuItems = false;
this->advancedOptions = advancedOptions; this->advancedOptions = advancedOptions;
this->searchTimer = searchTimer; this->searchTimer = searchTimer;
this->channelGroups = channelGroups;
strncpy(searchString, searchTimer.SearchString().c_str(), TEXTINPUTLENGTH); strncpy(searchString, searchTimer.SearchString().c_str(), TEXTINPUTLENGTH);
timerActive = searchTimer.Active(); timerActive = searchTimer.Active();
mode = searchTimer.SearchMode(); mode = searchTimer.SearchMode();
@ -735,6 +736,8 @@ cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer
useChannel = searchTimer.UseChannel(); useChannel = searchTimer.UseChannel();
startChannel = searchTimer.StartChannel(); startChannel = searchTimer.StartChannel();
stopChannel = searchTimer.StopChannel(); stopChannel = searchTimer.StopChannel();
channelGroup = searchTimer.ChannelGroup();
channelgroupIndex = -1;
useTime = searchTimer.UseTime(); useTime = searchTimer.UseTime();
startTime = searchTimer.StartTime(); startTime = searchTimer.StartTime();
stopTime = searchTimer.StopTime(); stopTime = searchTimer.StopTime();
@ -780,6 +783,10 @@ cRecMenuSearchTimerEdit::~cRecMenuSearchTimerEdit(void) {
delete *it; delete *it;
} }
useChannelSubMenu.clear(); useChannelSubMenu.clear();
for (std::vector<cRecMenuItem*>::iterator it = useGroupSubMenu.begin(); it != useGroupSubMenu.end(); it++) {
delete *it;
}
useGroupSubMenu.clear();
for (std::vector<cRecMenuItem*>::iterator it = useTimeSubMenu.begin(); it != useTimeSubMenu.end(); it++) { for (std::vector<cRecMenuItem*>::iterator it = useTimeSubMenu.begin(); it != useTimeSubMenu.end(); it++) {
delete *it; delete *it;
} }
@ -795,22 +802,45 @@ cRecMenuSearchTimerEdit::~cRecMenuSearchTimerEdit(void) {
currentMenuItems.clear(); currentMenuItems.clear();
} }
int cRecMenuSearchTimerEdit::SplitChannelGroups(std::vector<std::string> *channelGroups, std::vector<std::string> *channelgroups) {
int i = 0;
int j = 0;
for (std::vector<std::string>::iterator it = channelGroups->begin(); it != channelGroups->end(); it++) {
std::string a = *it;
splitstring s(a.c_str());
std::vector<std::string> value = s.split('|', 0);
dsyslog ("%s %s %d %s\n", __FILE__, __func__, __LINE__, s.c_str());
std::vector<std::string>::iterator ito = value.begin();
channelgroups->push_back(*ito);
std::string b = *ito;
if (b.compare(channelGroup) == 0)
j = i;
i++;
}
return j;
}
void cRecMenuSearchTimerEdit::InitMenuItems(void) { void cRecMenuSearchTimerEdit::InitMenuItems(void) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
useChannelPos = 6; useChannelPos = 6;
useTimePos = 7; useTimePos = 7;
useDayOfWeekPos = 8; useDayOfWeekPos = 8;
avoidRepeatsPos = 14; avoidRepeatsPos = 14;
mainMenuItems.push_back(new cRecMenuItemText(tr("Search String"), searchString, TEXTINPUTLENGTH, false, searchString));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Active"), timerActive, false, false, &timerActive, rmsSearchTimerSave));
std::vector<std::string> searchModes; std::vector<std::string> searchModes;
searchTimer.GetSearchModes(&searchModes); searchTimer.GetSearchModes(&searchModes);
std::vector<std::string> useChannelModes;
searchTimer.GetUseChannelModes(&useChannelModes);
channelgroupIndex = SplitChannelGroups(&channelGroups, &channelgroups);
mainMenuItems.push_back(new cRecMenuItemText(tr("Search String"), searchString, TEXTINPUTLENGTH, false, searchString));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Active"), timerActive, false, false, &timerActive, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Search Mode"), searchModes, mode, false, &mode, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemSelect(tr("Search Mode"), searchModes, mode, false, &mode, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Title"), useTitle, false, false, &useTitle, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Title"), useTitle, false, false, &useTitle, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Subtitle"), useSubtitle, false, false, &useSubtitle, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Subtitle"), useSubtitle, false, false, &useSubtitle, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Description"), useDescription, false, false, &useDescription, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Description"), useDescription, false, false, &useDescription, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Limit Channels"), useChannel, true, false, &useChannel, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemSelect(tr("Limit Channels"), useChannelModes, useChannel, false, &useChannel, rmsSearchTimerSave, true));
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Time"), useTime, true, false, &useTime, rmsSearchTimerSave)); mainMenuItems.push_back(new cRecMenuItemBool(tr("Use Time"), useTime, true, false, &useTime, rmsSearchTimerSave));
if (!advancedOptions) { if (!advancedOptions) {
mainMenuItems.push_back(new cRecMenuItemButton(tr("Display advanced Options"), rmsSearchTimerEditAdvanced, false)); mainMenuItems.push_back(new cRecMenuItemButton(tr("Display advanced Options"), rmsSearchTimerEditAdvanced, false));
@ -842,6 +872,8 @@ void cRecMenuSearchTimerEdit::InitMenuItems(void) {
useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Stop Channel"), Channels.GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave)); useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Stop Channel"), Channels.GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave));
#endif #endif
useGroupSubMenu.push_back(new cRecMenuItemSelect(tr("Channel Group"), channelgroups, channelgroupIndex, false, &channelgroupIndex, rmsSearchTimerSave));
useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start after"), startTime, false, &startTime, rmsSearchTimerSave)); useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start after"), startTime, false, &startTime, rmsSearchTimerSave));
useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start before"), stopTime, false, &stopTime, rmsSearchTimerSave)); useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start before"), stopTime, false, &stopTime, rmsSearchTimerSave));
@ -856,6 +888,7 @@ void cRecMenuSearchTimerEdit::InitMenuItems(void) {
void cRecMenuSearchTimerEdit::CreateMenuItems(void) { void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
bool reDraw = false; bool reDraw = false;
if (GetCurrentNumMenuItems() > 0) { if (GetCurrentNumMenuItems() > 0) {
InitMenu(false); InitMenu(false);
@ -867,8 +900,10 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
for (int i = 0; i < numMainMenuItems; i++) { for (int i = 0; i < numMainMenuItems; i++) {
currentMenuItems.push_back(mainMenuItems[i]); currentMenuItems.push_back(mainMenuItems[i]);
if ((i == useChannelPos) && useChannel) if ((i == useChannelPos) && (useChannel == 1))
AddSubMenu(&useChannelSubMenu); AddSubMenu(&useChannelSubMenu);
else if ((i == useChannelPos) && (useChannel == 2) && (channelgroups.size() > 0))
AddSubMenu(&useGroupSubMenu);
else if ((i == useTimePos) && useTime) else if ((i == useTimePos) && useTime)
AddSubMenu(&useTimeSubMenu); AddSubMenu(&useTimeSubMenu);
else if (advancedOptions && (i == useDayOfWeekPos) && useDayOfWeek) else if (advancedOptions && (i == useDayOfWeekPos) && useDayOfWeek)
@ -901,17 +936,26 @@ void cRecMenuSearchTimerEdit::AddSubMenu(std::vector<cRecMenuItem*> *subMenu) {
cTVGuideSearchTimer cRecMenuSearchTimerEdit::GetSearchTimer(void) { cTVGuideSearchTimer cRecMenuSearchTimerEdit::GetSearchTimer(void) {
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
searchTimer.SetSearchString(searchString); searchTimer.SetSearchString(searchString);
searchTimer.SetActive(timerActive); searchTimer.SetActive(timerActive);
searchTimer.SetSearchMode(mode); searchTimer.SetSearchMode(mode);
searchTimer.SetUseTitle(useTitle); searchTimer.SetUseTitle(useTitle);
searchTimer.SetUseSubtitle(useSubtitle); searchTimer.SetUseSubtitle(useSubtitle);
searchTimer.SetUseDesription(useDescription); searchTimer.SetUseDesription(useDescription);
searchTimer.SetUseChannel(useChannel); if (useChannel == 1) {
if (useChannel) {
searchTimer.SetStartChannel(startChannel); searchTimer.SetStartChannel(startChannel);
searchTimer.SetStopChannel(stopChannel); searchTimer.SetStopChannel(stopChannel);
} }
if (useChannel == 2) {
if (channelgroups.size() > 0) {
std::string & channelGroup = channelgroups[channelgroupIndex];
searchTimer.SetChannelGroup(channelGroup);
} else {
useChannel = 0;
}
}
searchTimer.SetUseChannel(useChannel);
searchTimer.SetUseTime(useTime); searchTimer.SetUseTime(useTime);
if (useTime) { if (useTime) {
searchTimer.SetStartTime(startTime); searchTimer.SetStartTime(startTime);

View File

@ -209,8 +209,10 @@ class cRecMenuSearchTimerEdit: public cRecMenu {
private: private:
bool advancedOptions; bool advancedOptions;
cTVGuideSearchTimer searchTimer; cTVGuideSearchTimer searchTimer;
std::vector<std::string> channelGroups;
std::vector<cRecMenuItem*> mainMenuItems; std::vector<cRecMenuItem*> mainMenuItems;
std::vector<cRecMenuItem*> useChannelSubMenu; std::vector<cRecMenuItem*> useChannelSubMenu;
std::vector<cRecMenuItem*> useGroupSubMenu;
std::vector<cRecMenuItem*> useTimeSubMenu; std::vector<cRecMenuItem*> useTimeSubMenu;
std::vector<cRecMenuItem*> useDayOfWeekSubMenu; std::vector<cRecMenuItem*> useDayOfWeekSubMenu;
std::vector<cRecMenuItem*> avoidRepeatSubMenu; std::vector<cRecMenuItem*> avoidRepeatSubMenu;
@ -226,9 +228,12 @@ private:
bool useTitle; bool useTitle;
bool useSubtitle; bool useSubtitle;
bool useDescription; bool useDescription;
bool useChannel; int useChannel;
int startChannel; int startChannel;
int stopChannel; int stopChannel;
std::string channelGroup;
std::vector<std::string> channelgroups;
int channelgroupIndex;
bool useTime; bool useTime;
int startTime; int startTime;
int stopTime; int stopTime;
@ -249,8 +254,9 @@ private:
bool useInFavorites; bool useInFavorites;
void InitMenuItems(void); void InitMenuItems(void);
void AddSubMenu(std::vector<cRecMenuItem*> *subMenu); void AddSubMenu(std::vector<cRecMenuItem*> *subMenu);
int SplitChannelGroups(std::vector<std::string> *channelGroups, std::vector<std::string> *channelgroups);
public: public:
cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions); cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer, bool advancedOptions, std::vector<std::string> channelGroups);
void CreateMenuItems(void); void CreateMenuItems(void);
virtual ~cRecMenuSearchTimerEdit(void); virtual ~cRecMenuSearchTimerEdit(void);
cTVGuideSearchTimer GetSearchTimer(void); cTVGuideSearchTimer GetSearchTimer(void);

View File

@ -577,7 +577,6 @@ void cTVGuideSearchTimer::GetSearchModes(std::vector<std::string> *searchModes)
searchModes->push_back(tr("regular expression")); searchModes->push_back(tr("regular expression"));
} }
void cTVGuideSearchTimer::Dump(void) { void cTVGuideSearchTimer::Dump(void) {
esyslog("tvguide searchtimer: strTimer: %s", strTimer.c_str()); esyslog("tvguide searchtimer: strTimer: %s", strTimer.c_str());
esyslog("tvguide searchtimer: ID: %d", ID); esyslog("tvguide searchtimer: ID: %d", ID);
@ -617,3 +616,10 @@ void cTVGuideSearchTimer::SetStopChannel(int stopChannel)
channelMax = Channels.GetByNumber(stopChannel); channelMax = Channels.GetByNumber(stopChannel);
#endif #endif
}; };
void cTVGuideSearchTimer::GetUseChannelModes(std::vector<std::string> *useChannelModes) {
useChannelModes->push_back(tr("No"));
useChannelModes->push_back(tr("Interval"));
useChannelModes->push_back(tr("Channel Group"));
useChannelModes->push_back(tr("only FTA"));
}

View File

@ -82,9 +82,10 @@ public:
bool UseSubtitle(void) { return useSubtitle; }; bool UseSubtitle(void) { return useSubtitle; };
bool UseDescription(void) { return useDescription; }; bool UseDescription(void) { return useDescription; };
int SearchMode(void) { return mode; }; int SearchMode(void) { return mode; };
bool UseChannel(void) { return useChannel; }; int UseChannel(void) { return useChannel; };
int StartChannel(void) { return (channelMin)?channelMin->Number():0; }; int StartChannel(void) { return (channelMin)?channelMin->Number():0; };
int StopChannel(void) { return (channelMax)?channelMax->Number():0; }; int StopChannel(void) { return (channelMax)?channelMax->Number():0; };
std::string ChannelGroup(void) { return channelGroup; };
bool UseTime(void) { return useTime; }; bool UseTime(void) { return useTime; };
int StartTime(void) { return startTime; }; int StartTime(void) { return startTime; };
int StopTime(void) { return stopTime; }; int StopTime(void) { return stopTime; };
@ -110,9 +111,10 @@ public:
void SetUseTitle(bool useTitle) { this->useTitle = useTitle; }; void SetUseTitle(bool useTitle) { this->useTitle = useTitle; };
void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; }; void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; };
void SetUseDesription(bool useDescription) { this->useDescription = useDescription; }; void SetUseDesription(bool useDescription) { this->useDescription = useDescription; };
void SetUseChannel(bool useChannel) { this->useChannel = useChannel; }; void SetUseChannel(int useChannel) { this->useChannel = useChannel; };
void SetStartChannel(int startChannel); void SetStartChannel(int startChannel);
void SetStopChannel(int stopChannel); void SetStopChannel(int stopChannel);
void SetChannelGroup(std::string channelGroup) { this->channelGroup = channelGroup; };
void SetUseTime(bool useTime) { this->useTime = useTime; }; void SetUseTime(bool useTime) { this->useTime = useTime; };
void SetStartTime(int startTime) { this->startTime = startTime; }; void SetStartTime(int startTime) { this->startTime = startTime; };
void SetStopTime(int stopTime) { this->stopTime = stopTime; }; void SetStopTime(int stopTime) { this->stopTime = stopTime; };
@ -135,6 +137,7 @@ public:
int GetNumTimers(void); int GetNumTimers(void);
int GetNumRecordings(void); int GetNumRecordings(void);
void GetSearchModes(std::vector<std::string> *searchModes); void GetSearchModes(std::vector<std::string> *searchModes);
void GetUseChannelModes(std::vector<std::string> *useChannelModes);
void Dump(void); void Dump(void);
}; };