Timer macros vs. filename in "Edit timers"
Commit Message
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
@@ -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();
@@ -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
@@ -19,6 +19,8 @@
#include "tools.h"
#define FOLDERDELIMCHAR '~'
+#define TIMERMACRO_TITLE "TITLE"
+#define TIMERMACRO_EPISODE "EPISODE"
extern bool VfatFileSystem;
extern int InstanceId;