From c7087c922e515ca3a3f52bed3cd97dbb4dcd53d3 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Sun, 13 Jun 2010 13:22:28 +0200 Subject: new default for recording filename if there is no subtitle --- epgsearchext.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'epgsearchext.c') diff --git a/epgsearchext.c b/epgsearchext.c index 26ff95a..f6f75cb 100644 --- a/epgsearchext.c +++ b/epgsearchext.c @@ -639,8 +639,10 @@ char* cSearchExt::BuildFile(const cEvent* pEvent) const char SubtitleBuffer[Utf8BufSize(MAX_SUBTITLE_LENGTH)]; if (isempty(Subtitle)) { - sprintf(SubtitleBuffer, "%s-%s", GETDATESTRING(pEvent), GETTIMESTRING(pEvent)); - Subtitle = SubtitleBuffer; + time_t Start = pEvent->StartTime(); + struct tm tm_r; + strftime(SubtitleBuffer, sizeof(SubtitleBuffer), "%Y.%m.%d-%R-%a", localtime_r(&Start, &tm_r)); + Subtitle = SubtitleBuffer; } else if (Utf8StrLen(Subtitle) > MAX_SUBTITLE_LENGTH) { -- cgit v1.2.3