*neutrino record: reduce multiple code for record calls

Some lines with recording-actions calls in record.cpp and neutrino.cpp were redundant.
Now we use only the exec() call with action key "Record" from record.cpp.
So we use the same functions with record button and with the recording menu item
in  user menu. This also causes, that we can see the infobar as response for user
on used menu item in user menu.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1803 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
thilo
2011-11-01 23:41:48 +00:00
parent 728f78c7b4
commit 432a2db13f
3 changed files with 14 additions and 28 deletions

View File

@@ -1213,9 +1213,18 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey )
{
printf("[neutrino] direct record\n");
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
if(!CRecordManager::getInstance()->RecordingStatus(live_channel_id))
if(!CRecordManager::getInstance()->RecordingStatus(live_channel_id))
{
CRecordManager::getInstance()->Record(live_channel_id);
return menu_return::RETURN_EXIT_ALL;
if(!g_InfoViewer->is_visible) // show Infoviewer
CNeutrinoApp::getInstance()->showInfo();
return menu_return::RETURN_EXIT_ALL;
}
else
DisplayInfoMessage(g_Locale->getText(LOCALE_RECORDING_IS_RUNNING));
}else if(actionKey == "Timeshift")
{
StartTimeshift();