summaryrefslogtreecommitdiff
path: root/history.c
diff options
context:
space:
mode:
Diffstat (limited to 'history.c')
-rw-r--r--history.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/history.c b/history.c
index 9795e82..ac15c92 100644
--- a/history.c
+++ b/history.c
@@ -163,8 +163,16 @@ cString cPluginHistory::SVDRPCommand(const char *Command, const char *Option, in
char *time = item->GetReplayTimeString();
string = cString::sprintf("%s%s\n", *string, time);
free(time);
+ const cRecording *recording;
+#if VDRVERSNUM >= 20301
+ {
+ LOCK_RECORDINGS_READ;
+ recording = Recordings->GetByName(item->GetFilename());
+ }
+#else
cThreadLock RecordingsLock(&Recordings);
- cRecording *recording = Recordings.GetByName(item->GetFilename());
+ recording = Recordings.GetByName(item->GetFilename());
+#endif
if (recording)
string = cString::sprintf("%s%s\n", *string, recording->Title(' '));
item = (cHistoryRecordingItem *)item->Next();