From 363a2bfb68a86f8c027f8e93f08f8a5aeb8de535 Mon Sep 17 00:00:00 2001 From: thilo Date: Sat, 1 Oct 2011 21:12:49 +0000 Subject: [PATCH] *neutrino record: fix return value in GetRecordMode() git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1733 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/driver/record.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 46cdeb7b1..4568cf140 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -694,18 +694,24 @@ int CRecordManager::GetRecordMode(const t_channel_id channel_id) { if (RecordingStatus(channel_id) || IsTimeshift(channel_id)) { - int records = GetRecordCount(); if (RecordingStatus(channel_id) && !IsTimeshift(channel_id)) return RECMODE_REC; - else if (IsTimeshift(channel_id) && (records == 1)) - return RECMODE_TSHIFT; - else if (IsTimeshift(channel_id) && (records > 1)) - return RECMODE_REC_TSHIFT; - else - return RECMODE_OFF; + if (channel_id == 0) + { + int records = GetRecordCount(); + if (IsTimeshift(channel_id) && (records == 1)) + return RECMODE_TSHIFT; + else if (IsTimeshift(channel_id) && (records > 1)) + return RECMODE_REC_TSHIFT; + else + return RECMODE_OFF; + }else + { + if (IsTimeshift(channel_id)) + return RECMODE_TSHIFT; + } } - else - return RECMODE_OFF; + return RECMODE_OFF; } bool CRecordManager::Record(const t_channel_id channel_id, const char * dir, bool timeshift)