habe addTVBrowserTimerEvent um die Möglichkeit erweitert, eine Aufnahme in TV-Browser auch mit der Option zu planen, so dass sie über Ngrab erfolgt.
Dazu muss man in TV-Browser den Parameter
Code: Alles auswählen
type=ngrab
Will man über ngrab Aufnehmen, sehen die Parameter unter TV-Browser nun für ngrab so aus:
Aufnahme:
Code: Alles auswählen
command=add&type=ngrab&syear={start_year}&smonth={start_month}&sday={start_day}&shour={start_hour}&smin={start_minute}&eyear={end_year}&emonth={end_month}&eday={end_day}&ehour={end_hour}&emin={end_minute}&channel={urlencode(isset(channel_name_external_quiet, channel_name), "utf8")}&descr={urlencode(title, "utf8")}
Code: Alles auswählen
command=delete&type=ngrab&syear={start_year}&smonth={start_month}&sday={start_day}&shour={start_hour}&smin={start_minute}&eyear={end_year}&emonth={end_month}&eday={end_day}&ehour={end_hour}&emin={end_minute}&channel={urlencode(isset(channel_name_external_quiet, channel_name), "utf8")}&descr={urlencode(title, "utf8")}
Code: Alles auswählen
type=ngrab
Code: Alles auswählen
Index: ./apps/tuxbox/enigma/src/enigma_dyn_timer.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/enigma/src/enigma_dyn_timer.cpp,v
retrieving revision 1.23
diff -u -p -r1.23 enigma_dyn_timer.cpp
--- a/./apps/tuxbox/enigma/src/enigma_dyn_timer.cpp 24 Sep 2008 19:20:16 -0000 1.23
+++ b/./apps/tuxbox/enigma/src/enigma_dyn_timer.cpp 6 Dec 2008 12:18:47 -0000
@@ -344,6 +344,7 @@ static eString addTVBrowserTimerEvent(eS
content->local_header["Content-Type"]="text/html; charset=utf-8";
std::map<eString, eString> opt = getRequestOptions(opts, '&');
eString command = opt["command"];
+ eString eventType = opt["type"];
eString sday = opt["sday"];
eString smonth = opt["smonth"];
eString syear = opt["syear"];
@@ -356,6 +357,12 @@ static eString addTVBrowserTimerEvent(eS
eString emin = opt["emin"];
eString channel = httpUnescape(opt["channel"]);
eString description = httpUnescape(opt["descr"]);
+
+ int type = ePlaylistEntry::recDVR;
+
+ if( eventType == "ngrab" )
+ type = ePlaylistEntry::recNgrab;
+
if (!description)
description = "No description available";
@@ -425,7 +432,8 @@ static eString addTVBrowserTimerEvent(eS
{
if (command == "add")
{
- ePlaylistEntry entry(string2ref(result1), eventStartTime, duration, -1, ePlaylistEntry::stateWaiting | ePlaylistEntry::RecTimerEntry | ePlaylistEntry::recDVR);
+ ePlaylistEntry entry(string2ref(result1), eventStartTime, duration, -1, ePlaylistEntry::stateWaiting |
+ ePlaylistEntry::RecTimerEntry | type);
entry.service.descr = channel + "/" + description;
if (eTimerManager::getInstance()->addEventToTimerList(entry) == -1)
@@ -443,7 +451,7 @@ static eString addTVBrowserTimerEvent(eS
ePlaylistEntry e(
string2ref(result1),
eventStartTime,
- -1, -1, ePlaylistEntry::stateWaiting | ePlaylistEntry::RecTimerEntry | ePlaylistEntry::recDVR);
+ -1, -1, ePlaylistEntry::stateWaiting | ePlaylistEntry::RecTimerEntry | type);
eTimerManager::getInstance()->deleteEventFromTimerList(e, true);
eTimerManager::getInstance()->saveTimerList();