rpms/vdr/devel vdr-1.6.0-plugin-epgsearch-timercmd-0.1.diff, NONE, 1.1.2.1 vdr.spec, 1.23.2.5, 1.23.2.6 timercmd-0.1_1.5.12.diff, 1.1.2.1, NONE
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Mon Apr 7 14:59:50 UTC 2008
Author: scop
Update of /cvs/pkgs/rpms/vdr/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3779
Modified Files:
Tag: vdr-1_6-test
vdr.spec
Added Files:
Tag: vdr-1_6-test
vdr-1.6.0-plugin-epgsearch-timercmd-0.1.diff
Removed Files:
Tag: vdr-1_6-test
timercmd-0.1_1.5.12.diff
Log Message:
Apply "unofficial" timercmd patch from HoochVDR (until the epgsearch one applies).
vdr-1.6.0-plugin-epgsearch-timercmd-0.1.diff:
--- NEW FILE vdr-1.6.0-plugin-epgsearch-timercmd-0.1.diff ---
diff -ruN vdr-1.6.0.orig/config.c vdr-1.6.0/config.c
--- vdr-1.6.0.orig/config.c 2008-03-25 10:32:55.000000000 -0500
+++ vdr-1.6.0/config.c 2008-03-25 10:34:04.000000000 -0500
@@ -125,6 +125,7 @@
cCommands Commands;
cCommands RecordingCommands;
+cCommands TimerCommands;
// --- cSVDRPhosts -----------------------------------------------------------
diff -ruN vdr-1.6.0.orig/config.h vdr-1.6.0/config.h
--- vdr-1.6.0.orig/config.h 2008-03-25 10:32:58.000000000 -0500
+++ vdr-1.6.0/config.h 2008-03-25 10:34:04.000000000 -0500
@@ -174,6 +174,7 @@
extern cCommands Commands;
extern cCommands RecordingCommands;
+extern cCommands TimerCommands;
extern cSVDRPhosts SVDRPhosts;
class cSetupLine : public cListObject {
diff -ruN vdr-1.6.0.orig/menu.c vdr-1.6.0/menu.c
--- vdr-1.6.0.orig/menu.c 2008-03-25 10:32:58.000000000 -0500
+++ vdr-1.6.0/menu.c 2008-03-25 10:34:04.000000000 -0500
@@ -773,8 +773,20 @@
return state;
}
-// --- cMenuTimerItem --------------------------------------------------------
+// --- cMenuCommands ---------------------------------------------------------
+// declaration shifted so it can be used in cMenuTimers
+class cMenuCommands : public cOsdMenu {
+private:
+ cCommands *commands;
+ char *parameters;
+ eOSState Execute(void);
+public:
+ cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters = NULL);
+ virtual ~cMenuCommands();
+ virtual eOSState ProcessKey(eKeys Key);
+ };
+// --- cMenuTimerItem --------------------------------------------------------
class cMenuTimerItem : public cOsdItem {
private:
cTimer *timer;
@@ -837,6 +849,7 @@
eOSState OnOff(void);
eOSState Info(void);
cTimer *CurrentTimer(void);
+ eOSState Commands(eKeys Key = kNone);
void SetHelpKeys(void);
public:
cMenuTimers(void);
@@ -953,6 +966,53 @@
return osContinue;
}
+#define CHECK_2PTR_NULL(x_,y_) ((x_)? ((y_)? y_:""):"")
+
+eOSState cMenuTimers::Commands(eKeys Key)
+{
+ if (HasSubMenu() || Count() == 0)
+ return osContinue;
+ cTimer *ti = CurrentTimer();
+ if (ti) {
+ char *parameter = NULL;
+ const cEvent *pEvent = ti->Event();
+ int iRecNumber=0;
+
+ if(!pEvent) {
+ Timers.SetEvents();
+ pEvent = ti->Event();
+ }
+ if(pEvent) {
+// create a dummy recording to get the real filename
+ cRecording *rc_dummy = new cRecording(ti, pEvent);
+ Recordings.Load();
+ cRecording *rc = Recordings.GetByName(rc_dummy->FileName());
+
+ delete rc_dummy;
+ if(rc)
+ iRecNumber=rc->Index() + 1;
+ }
+//Parameter format TimerNumber 'ChannelId' Start Stop 'Titel' 'Subtitel' 'file' RecNumer
+// 1 2 3 4 5 6 7 8
+ asprintf(¶meter, "%d '%s' %d %d '%s' '%s' '%s' %d", ti->Index(),
+ *ti->Channel()->GetChannelID().ToString(),
+ (int)ti->StartTime(),
+ (int)ti->StopTime(),
+ CHECK_2PTR_NULL(pEvent, pEvent->Title()),
+ CHECK_2PTR_NULL(pEvent, pEvent->ShortText()),
+ ti->File(),
+ iRecNumber);
+ isyslog("timercmd: %s", parameter);
+ cMenuCommands *menu;
+ eOSState state = AddSubMenu(menu = new cMenuCommands(tr("Timer commands"), &TimerCommands, parameter));
+ free(parameter);
+ if (Key != kNone)
+ state = menu->ProcessKey(Key);
+ return state;
+ }
+ return osContinue;
+}
+
eOSState cMenuTimers::ProcessKey(eKeys Key)
{
int TimerNumber = HasSubMenu() ? Count() : -1;
@@ -967,6 +1027,8 @@
case kInfo:
case kBlue: return Info();
break;
+ case k1...k9: return Commands(Key);
+ case k0: return (TimerCommands.Count()? Commands():osContinue);
default: break;
}
}
@@ -1569,17 +1631,6 @@
// --- cMenuCommands ---------------------------------------------------------
-class cMenuCommands : public cOsdMenu {
-private:
- cCommands *commands;
- char *parameters;
- eOSState Execute(void);
-public:
- cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters = NULL);
- virtual ~cMenuCommands();
- virtual eOSState ProcessKey(eKeys Key);
- };
-
cMenuCommands::cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters)
:cOsdMenu(Title)
{
diff -ruN vdr-1.6.0.orig/vdr.c vdr-1.6.0/vdr.c
--- vdr-1.6.0.orig/vdr.c 2008-03-25 10:33:15.000000000 -0500
+++ vdr-1.6.0/vdr.c 2008-03-25 10:34:04.000000000 -0500
@@ -578,6 +578,7 @@
Timers.Load(AddDirectory(ConfigDirectory, "timers.conf")) &&
Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true) &&
RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true) &&
+ TimerCommands.Load(AddDirectory(ConfigDirectory, "timercmds.conf"), true) &&
SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true) &&
Keys.Load(AddDirectory(ConfigDirectory, "remote.conf")) &&
KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true)
Index: vdr.spec
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr.spec,v
retrieving revision 1.23.2.5
retrieving revision 1.23.2.6
diff -u -r1.23.2.5 -r1.23.2.6
--- vdr.spec 7 Apr 2008 14:56:53 -0000 1.23.2.5
+++ vdr.spec 7 Apr 2008 14:59:14 -0000 1.23.2.6
@@ -68,9 +68,11 @@
# TODO
Patch10: %{name}-1.4.7-hlcutter-0.2.0-finnish.patch
# mainmenuhooks, timercmd and progressbar-support from
-# http://winni.vdr-developer.org/epgsearch/downloads/beta/vdr-epgsearch-0.9.24.beta25.tgz
+# http://winni.vdr-developer.org/epgsearch/downloads/beta/vdr-epgsearch-0.9.24.beta26.tgz
Patch11: MainMenuHooks-v1_0.patch
-Patch12: timercmd-0.1_1.5.12.diff
+# timercmd included in epgsearch does not apply yet
+#Patch12: timercmd-0.1_1.5.12.diff
+Patch12: http://www.hoochvdr.info/files/vdr-1.6.0-plugin-epgsearch-timercmd-0.1.diff
Patch13: %{name}-1.5.17-progressbar-support-0.0.1.diff
Patch14: %{name}-1.6.0-includes+pkgconfig.patch
Patch15: %{name}-1.6.0-fedora-pkgconfig.patch
@@ -181,8 +183,7 @@
# TODO: does not apply
#patch10 -p0
%patch11 -p1
-# TODO: does not apply
-#patch12 -p1
+%patch12 -p1
%patch13 -p1
%patch14 -p0
%patch15 -p0
@@ -483,6 +484,9 @@
%endif # plugins
%changelog
+* Mon Apr 7 2008 Ville Skyttä <ville.skytta at iki.fi>
+- Apply "unofficial" timercmd patch from HoochVDR.
+
* Sun Apr 6 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.6.0-0.4
- Obsolete vdr-subtitles.
--- timercmd-0.1_1.5.12.diff DELETED ---
More information about the fedora-extras-commits
mailing list