summaryrefslogtreecommitdiff
path: root/recmanager.c
diff options
context:
space:
mode:
Diffstat (limited to 'recmanager.c')
-rw-r--r--recmanager.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/recmanager.c b/recmanager.c
index 18e38e9..1c56c97 100644
--- a/recmanager.c
+++ b/recmanager.c
@@ -175,12 +175,25 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
return;
}
//Set choosen path
+ bool addSubtitle = false;
+ if (!isempty(event->ShortText())) { // add subtitle if present
+ addSubtitle = (config.addSubtitleToTimer != addSubtitleNever);
+ if (config.addSubtitleToTimer == addSubtitleSmart)
+ if (event->Duration() > 80 * 60)
+ addSubtitle = false;
+ }
cString newFileName;
if (path.size() > 0) {
std::replace(path.begin(), path.end(), '/', '~');
- newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
+ if (addSubtitle)
+ newFileName = cString::sprintf("%s~%s~%s", path.c_str(), event->Title(), event->ShortText());
+ else
+ newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
} else {
- newFileName = event->Title();
+ if (addSubtitle)
+ newFileName = cString::sprintf("%s~%s", event->Title(), event->ShortText());
+ else
+ newFileName = event->Title();
}
timer->SetFile(*newFileName);
}