Timer macros vs. filename in "Edit timers"

Message ID 4B93B44D.9090505@tvdr.de
State New
Headers

Commit Message

Klaus Schmidinger March 7, 2010, 2:12 p.m. UTC
  On 07.03.2010 15:05, Klaus Schmidinger wrote:
> On 28.02.2010 20:59, Udo Richter wrote:
>> Am 28.02.2010 16:07, schrieb Klaus Schmidinger:
>>> - The file name in the "Timers" menu now shows only the base name of the recording
>>>   without the folder path (if any). Otherwise with long folder paths the actual
>>>   recording name was not visible at all.
>> If I understand that correctly, then many of my repeating recordings
>> will soon be named "TITLE" or "EPISODE" only in the timer menu, because
>> many of my timers use the scheme "ShowName~EPISODE". I prefer to add
>> ~EPISODE or ~TITLE individually instead of of using the "Use episode
>> name" option.
> 
> Would it be ok if I change it so that the full name is displayed
> (like before) if the string that would be displayed with the new
> mechanism is "TITLE" or "EPISODE"?

While we're at it, here's the patch right away.

Klaus
  

Patch

--- menu.c	2010/03/07 12:32:28	2.19
+++ menu.c	2010/03/07 14:08:15
@@ -1053,7 +1053,7 @@ 
      day = buffer;
      }
   const char *File = strrchr(timer->File(), FOLDERDELIMCHAR);
-  if (File)
+  if (File && strcmp(File + 1, TIMERMACRO_TITLE) && strcmp(File + 1, TIMERMACRO_EPISODE))
      File++;
   else
      File = timer->File();
--- recording.c	2010/01/16 11:18:30	2.22
+++ recording.c	2010/03/07 14:06:04
@@ -58,9 +58,6 @@ 
 #define DISKCHECKDELTA    100 // seconds between checks for free disk space
 #define REMOVELATENCY      10 // seconds to wait until next check after removing a file
 
-#define TIMERMACRO_TITLE    "TITLE"
-#define TIMERMACRO_EPISODE  "EPISODE"
-
 #define MAX_SUBTITLE_LENGTH  40
 
 #define MAX_LINK_LEVEL  6
--- recording.h	2010/01/16 11:16:20	2.13
+++ recording.h	2010/03/07 14:06:15
@@ -19,6 +19,8 @@ 
 #include "tools.h"
 
 #define FOLDERDELIMCHAR '~'
+#define TIMERMACRO_TITLE    "TITLE"
+#define TIMERMACRO_EPISODE  "EPISODE"
 
 extern bool VfatFileSystem;
 extern int InstanceId;