summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Maass <mase@mase1.setho.org>2013-11-05 14:28:17 (GMT)
committerThomas Maass <mase@mase1.setho.org>2013-11-05 14:28:17 (GMT)
commitd23a34943ba61aef57f45f01109d74d093b011f8 (patch)
treeb7de8177266057a3db201c8830c0c7a9f09ad395
parentedf6617c323c8ff173201531c10debf199b4dec5 (diff)
downloadvdr-plugin-hddarchive-d23a34943ba61aef57f45f01109d74d093b011f8.tar.gz
vdr-plugin-hddarchive-d23a34943ba61aef57f45f01109d74d093b011f8.tar.bz2
Fixed compatibility with VDR 2.0.4.
-rw-r--r--mymenu.c14
-rw-r--r--mymenu.h10
2 files changed, 23 insertions, 1 deletions
diff --git a/mymenu.c b/mymenu.c
index 1309ba3..55045fa 100644
--- a/mymenu.c
+++ b/mymenu.c
@@ -216,9 +216,17 @@ eOSState cMyMenuRecordings::Delete(void)
}
cRecording *recording = ri->Recording();
cString FileName = recording->FileName();
+#if APIVERSNUM > 20101
if (RecordingsHandler.GetUsage(FileName)) {
+#else
+ if (cCutter::Active(ri->Recording()->FileName())) {
+#endif
if (Interface->Confirm(tr("Recording is being edited - really delete?"))) {
+#if APIVERSNUM > 20101
RecordingsHandler.Del(FileName);
+#else
+ cCutter::Stop();
+#endif
recording = Recordings.GetByName(FileName); // RecordingsHandler.Del() might have deleted it if it was the edited version
// we continue with the code below even if recording is NULL,
// in order to have the menu updated etc.
@@ -249,12 +257,18 @@ eOSState cMyMenuRecordings::Info(void)
{
if (HasSubMenu() || Count() == 0)
return osContinue;
+#if APIVERSNUM > 20101
if (cMyMenuRecordingItem *ri = (cMyMenuRecordingItem *)Get(Current())) {
if (ri->IsDirectory())
return AddSubMenu(new cMenuPathEdit(cString(ri->Recording()->Name(), strchrn(ri->Recording()->Name(), FOLDERDELIMCHAR, ri->Level() + 1))));
else
return AddSubMenu(new cMenuRecording(ri->Recording(), true));
}
+#else
+ cMyMenuRecordingItem *ri = (cMyMenuRecordingItem *)Get(Current());
+ if (ri && !ri->IsDirectory() && ri->Recording()->Info()->Title())
+ return AddSubMenu(new cMenuRecording(ri->Recording(), true));
+#endif
return osContinue;
}
diff --git a/mymenu.h b/mymenu.h
index a58d07a..6b92168 100644
--- a/mymenu.h
+++ b/mymenu.h
@@ -67,13 +67,21 @@ class cMyMenuRecordingItem : public cOsdItem {
class cMenuRecording : public cOsdMenu {
private:
+#if APIVERSNUM > 20101
cRecording *recording;
cString originalFileName;
int recordingsState;
- bool withButtons;
bool RefreshRecording(void);
+#else
+ cRecording *recording;
+#endif
+ bool withButtons;
public:
+#if APIVERSNUM > 20101
cMenuRecording(cRecording *Recording, bool WithButtons = false);
+#else
+ cMenuRecording(const cRecording *Recording, bool WithButtons = false);
+#endif
virtual void Display(void);
virtual eOSState ProcessKey(eKeys Key);
};