diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2021-04-06 09:50:30 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2021-04-06 09:50:30 +0200 |
commit | 19a0e3cda769aff7079e891a0cbcccb7329b00d3 (patch) | |
tree | 1227b9202ada67b2c70a6ec053af04a2bf8ab237 /timers.c | |
parent | 7fb13b3cbf6b7a2290a85e4d93b208c5a164dd43 (diff) | |
download | vdr-19a0e3cda769aff7079e891a0cbcccb7329b00d3.tar.gz vdr-19a0e3cda769aff7079e891a0cbcccb7329b00d3.tar.bz2 |
Fixed MakePatternFileName() in case the event doesn't yet have a short text
Diffstat (limited to 'timers.c')
-rw-r--r-- | timers.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.c 5.7 2021/04/06 08:48:35 kls Exp $ + * $Id: timers.c 5.8 2021/04/06 09:50:30 kls Exp $ */ #include "timers.h" @@ -163,7 +163,8 @@ static cString MakePatternFileName(const char *Pattern, const char *Title, const if (MatchPattern(Pattern, Title, &Before, &Match, &After)) { char *Result = strdup(File); Result = strreplace(Result, TIMERMACRO_TITLE, Title); - Result = strreplace(Result, TIMERMACRO_EPISODE, Episode); + if (!isempty(Episode)) // the event might not yet have a "short text", so we leave this to the actual recording + Result = strreplace(Result, TIMERMACRO_EPISODE, Episode); Result = strreplace(Result, TIMERMACRO_BEFORE, Before); Result = strreplace(Result, TIMERMACRO_MATCH, Match); Result = strreplace(Result, TIMERMACRO_AFTER, After); |