Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] patch: return to menu after playing a recording



hi list!

since yet vdr only returns to the "recordingsmenu" when the user interrupts
the playback with the (back) or (exit) button. when the video is fully
played vdr does not show the recordings again.
i don't really like this behaviour, i.e. if i replay edited 30. min
videos... so i created a little patch.

the patch creates a new option (for setup.conf) in the playback settings
and has the option: return to menu on/off after playback.

i hope that klaus likes this too and puts it in a newer release of
vdr. the patch was created using vdr 1.3.15 and applies also to 1.3.18.

WISH:
=====
it would be really nice if the mplayer-plugin could use this setting
as well to return to the recordings after playing. i looked at the source,
but i could not get "return to menu" to work. please find a solution for
that. it says in the README: back button does not work yet. but i think that
is one of the most important features of the plugin.

bye,
sebastian.

the patch follows:

diff -uN vdr-1.3.15-orig/config.c vdr-1.3.15/config.c
--- vdr-1.3.15-orig/config.c    2004-10-31 17:17:39.000000000 +0100
+++ vdr-1.3.15/config.c 2005-02-01 12:12:41.000000000 +0100
@@ -293,6 +293,7 @@
   MinEventTimeout = 30;
   MinUserInactivity = 120;
   MultiSpeedMode = 0;
+  MenuReturnAfterReplay = 1;
   ShowReplayMode = 0;
   ResumeID = 0;
   CurrentChannel = -1;
@@ -443,6 +444,7 @@
   else if (!strcasecmp(Name, "UseSmallFont"))        UseSmallFont       =
atoi(Value);
   else if (!strcasecmp(Name, "MaxVideoFileSize"))    MaxVideoFileSize   =
atoi(Value);
   else if (!strcasecmp(Name, "SplitEditedFiles"))    SplitEditedFiles   =
atoi(Value);
+  else if (!strcasecmp(Name, "MenuReturnAfterReplay"))
MenuReturnAfterReplay = atoi(Value);
   else if (!strcasecmp(Name, "MinEventTimeout"))     MinEventTimeout    =
atoi(Value);
   else if (!strcasecmp(Name, "MinUserInactivity"))   MinUserInactivity  =
atoi(Value);
   else if (!strcasecmp(Name, "MultiSpeedMode"))      MultiSpeedMode     =
atoi(Value);
@@ -503,6 +505,7 @@
   Store("UseSmallFont",       UseSmallFont);
   Store("MaxVideoFileSize",   MaxVideoFileSize);
   Store("SplitEditedFiles",   SplitEditedFiles);
+  Store("MenuReturnAfterReplay", MenuReturnAfterReplay);
   Store("MinEventTimeout",    MinEventTimeout);
   Store("MinUserInactivity",  MinUserInactivity);
   Store("MultiSpeedMode",     MultiSpeedMode);
diff -uN vdr-1.3.15-orig/config.h vdr-1.3.15/config.h
--- vdr-1.3.15-orig/config.h    2004-10-31 17:17:02.000000000 +0100
+++ vdr-1.3.15/config.h 2005-02-01 12:13:39.000000000 +0100
@@ -245,6 +245,7 @@
   int UseSmallFont;
   int MaxVideoFileSize;
   int SplitEditedFiles;
+  int MenuReturnAfterReplay;
   int MinEventTimeout, MinUserInactivity;
   int MultiSpeedMode;
   int ShowReplayMode;
diff -uN vdr-1.3.15-orig/i18n.c vdr-1.3.15/i18n.c
--- vdr-1.3.15-orig/i18n.c      2004-11-01 15:18:48.000000000 +0100
+++ vdr-1.3.15/i18n.c   2005-02-01 12:24:56.000000000 +0100
@@ -3509,6 +3509,26 @@
     "ID nastavka",
     "Jätkamise ID",
   },
+  { "Setup.Replay$Return to menu after replay",
+    "Nach Wiedergabe ins Menü zurückkehren",
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+    "",// TODO
+  },
   { "Setup.Miscellaneous$Min. event timeout (min)",
     "Mindest Event Pause (min)",
     "Najmanjsi cas dogodka (min)",
Common subdirectories: vdr-1.3.15-orig/libsi and vdr-1.3.15/libsi
diff -uN vdr-1.3.15-orig/menu.c vdr-1.3.15/menu.c
--- vdr-1.3.15-orig/menu.c      2004-11-01 14:49:40.000000000 +0100
+++ vdr-1.3.15/menu.c   2005-02-01 12:14:57.000000000 +0100
@@ -2129,6 +2129,7 @@
   Add(new cMenuEditBoolItem(tr("Setup.Replay$Multi speed mode"),
&data.MultiSpeedMode));
   Add(new cMenuEditBoolItem(tr("Setup.Replay$Show replay mode"),
&data.ShowReplayMode));
   Add(new cMenuEditIntItem(tr("Setup.Replay$Resume ID"), &data.ResumeID, 0,
99));
+  Add(new cMenuEditBoolItem(tr("Setup.Replay$Return to menu after replay"),
&data.MenuReturnAfterReplay));
 }

 // --- cMenuSetupMisc
--------------------------------------------------------
@@ -3373,7 +3374,8 @@
 eOSState cReplayControl::ProcessKey(eKeys Key)
 {
   if (!Active())
-     return osEnd;
+      if (Setup.MenuReturnAfterReplay) return osRecordings;
+      else return osEnd;
   if (visible) {
      if (timeoutShow && time(NULL) > timeoutShow) {
         Hide();
@@ -3443,7 +3445,10 @@
                            else
                               Show();
                            break;
-            case kBack:    return osRecordings;
+            case kBack:
+              if (Setup.MenuReturnAfterReplay) return osRecordings;
+              else return osEnd;
+//              return osRecordings;
             default:       return osUnknown;
             }
           }
Common subdirectories: vdr-1.3.15-orig/PLUGINS and vdr-1.3.15/PLUGINS
Common subdirectories: vdr-1.3.15-orig/symbols and vdr-1.3.15/symbols




Home | Main Index | Thread Index