diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2020-02-17 14:15:44 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2020-02-17 16:05:43 +0100 |
commit | b96f80024061d3d20581e4158ae30a5b6a8aa290 (patch) | |
tree | 2553cb8bf7ea8700469428cb538ad1e3ec9079c9 /recmanager.c | |
parent | 5d9ed1439a8e46becf90fbd00189d655cb5efcfb (diff) | |
download | vdr-plugin-tvguide-b96f80024061d3d20581e4158ae30a5b6a8aa290.tar.gz vdr-plugin-tvguide-b96f80024061d3d20581e4158ae30a5b6a8aa290.tar.bz2 |
Add episode to manual timer
Diffstat (limited to 'recmanager.c')
-rw-r--r-- | recmanager.c | 17 |
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); } |