summaryrefslogtreecommitdiff
path: root/recmanager.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-12-24 11:30:47 +0100
committerlouis <louis.braun@gmx.de>2013-12-24 11:30:47 +0100
commit53fa2c70cac3025ff223a6d0e2cdae2805b14c30 (patch)
treee7fcf969e129db869efc2744a115b19ef4498e2c /recmanager.c
parent5fa365b68cc5e415fbc3db552d841705ff6f6293 (diff)
downloadvdr-plugin-tvguide-53fa2c70cac3025ff223a6d0e2cdae2805b14c30.tar.gz
vdr-plugin-tvguide-53fa2c70cac3025ff223a6d0e2cdae2805b14c30.tar.bz2
Added Event Short Text (if available) to RecName
Diffstat (limited to 'recmanager.c')
-rw-r--r--recmanager.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/recmanager.c b/recmanager.c
index 54e05f1..32bff2a 100644
--- a/recmanager.c
+++ b/recmanager.c
@@ -98,14 +98,14 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
Timers.Add(timer);
isyslog("timer %s added (active)", *timer->ToDescr());
}
- SetTimerPath(timer, path);
+ SetTimerPath(timer, event, path);
Timers.SetModified();
return timer;
}
cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
cTimer *t = new cTimer(event);
- SetTimerPath(t, path);
+ SetTimerPath(t, event, path);
RemoteTimers_Timer_v1_0 rt;
rt.timer = t;
pRemoteTimers->Service("RemoteTimers::GetTimer-v1.0", &rt.timer);
@@ -122,12 +122,19 @@ cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
return rt.timer;
}
-void cRecManager::SetTimerPath(cTimer *timer, std::string path) {
+void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string path) {
+ cString newFileName;
if (path.size() > 0) {
std::replace(path.begin(), path.end(), '/', '~');
- cString newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
- timer->SetFile(*newFileName);
+ newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
+ } else {
+ newFileName = event->Title();
}
+
+ if(!isempty(event->ShortText()))
+ newFileName = cString::sprintf("%s~%s", *newFileName, event->ShortText());
+
+ timer->SetFile(*newFileName);
}
void cRecManager::DeleteTimer(int timerID) {