mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
-fix manuel rec dir in timerlist
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1351 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -45,10 +45,12 @@
|
|||||||
#include <driver/rcinput.h>
|
#include <driver/rcinput.h>
|
||||||
#include <driver/screen_max.h>
|
#include <driver/screen_max.h>
|
||||||
|
|
||||||
|
#include <gui/channellist.h>
|
||||||
#include <gui/color.h>
|
#include <gui/color.h>
|
||||||
#include <gui/eventlist.h>
|
#include <gui/eventlist.h>
|
||||||
|
#include <gui/filebrowser.h>
|
||||||
#include <gui/infoviewer.h>
|
#include <gui/infoviewer.h>
|
||||||
#include <gui/channellist.h>
|
|
||||||
|
|
||||||
#include <gui/widget/buttons.h>
|
#include <gui/widget/buttons.h>
|
||||||
#include <gui/widget/hintbox.h>
|
#include <gui/widget/hintbox.h>
|
||||||
@@ -57,7 +59,6 @@
|
|||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
#include <gui/widget/stringinput.h>
|
#include <gui/widget/stringinput.h>
|
||||||
#include <gui/widget/stringinput_ext.h>
|
#include <gui/widget/stringinput_ext.h>
|
||||||
#include <gui/widget/mountchooser.h>
|
|
||||||
|
|
||||||
#include <system/settings.h>
|
#include <system/settings.h>
|
||||||
#include <system/fsmounter.h>
|
#include <system/fsmounter.h>
|
||||||
@@ -370,7 +371,22 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
g_RCInput->postMsg(CRCInput::RC_timeout, 0); // leave underlying menu also
|
g_RCInput->postMsg(CRCInput::RC_timeout, 0); // leave underlying menu also
|
||||||
return menu_return::RETURN_EXIT;
|
return menu_return::RETURN_EXIT;
|
||||||
}
|
}
|
||||||
|
else if(actionKey == "rec_dir1") {
|
||||||
|
parent->hide();
|
||||||
|
const char *action_str = "RecDir1";
|
||||||
|
if(chooserDir(timerlist[selected].recordingDir, true, action_str, sizeof(timerlist[selected].recordingDir)-1)){
|
||||||
|
printf("[%s] new %s dir %s\n",__FILE__, action_str, timerlist[selected].recordingDir);
|
||||||
|
}
|
||||||
|
return menu_return::RETURN_REPAINT;
|
||||||
|
}
|
||||||
|
else if(actionKey == "rec_dir2") {
|
||||||
|
parent->hide();
|
||||||
|
const char *action_str = "RecDir2";
|
||||||
|
if(chooserDir(timerNew.recordingDir, true, action_str, sizeof(timerNew.recordingDir)-1)){
|
||||||
|
printf("[%s] new %s dir %s\n",__FILE__, action_str, timerNew.recordingDir);
|
||||||
|
}
|
||||||
|
return menu_return::RETURN_REPAINT;
|
||||||
|
}
|
||||||
if (parent)
|
if (parent)
|
||||||
{
|
{
|
||||||
parent->hide();
|
parent->hide();
|
||||||
@@ -1062,14 +1078,8 @@ int CTimerList::modifyTimer()
|
|||||||
if (!strlen(timer->recordingDir))
|
if (!strlen(timer->recordingDir))
|
||||||
strncpy(timer->recordingDir,g_settings.network_nfs_recordingdir,sizeof(timer->recordingDir));
|
strncpy(timer->recordingDir,g_settings.network_nfs_recordingdir,sizeof(timer->recordingDir));
|
||||||
|
|
||||||
CMountChooser recDirs(LOCALE_TIMERLIST_RECORDING_DIR,NEUTRINO_ICON_SETTINGS,NULL,
|
bool recDirEnabled = (timer->eventType == CTimerd::TIMER_RECORD) && (g_settings.recording_type == RECORDING_FILE);
|
||||||
timer->recordingDir, g_settings.network_nfs_recordingdir);
|
CMenuForwarder* m6 = new CMenuForwarder(LOCALE_TIMERLIST_RECORDING_DIR, recDirEnabled, timer->recordingDir, this, "rec_dir1", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
||||||
if (!recDirs.hasItem())
|
|
||||||
{
|
|
||||||
printf("[CTimerList] warning: no network devices available\n");
|
|
||||||
}
|
|
||||||
bool recDirEnabled = recDirs.hasItem() && (timer->eventType == CTimerd::TIMER_RECORD) && (g_settings.recording_type == RECORDING_FILE);
|
|
||||||
CMenuForwarder* m6 = new CMenuForwarder(LOCALE_TIMERLIST_RECORDING_DIR,recDirEnabled,timer->recordingDir, &recDirs);
|
|
||||||
|
|
||||||
timerSettings.addItem(GenericMenuSeparatorLine);
|
timerSettings.addItem(GenericMenuSeparatorLine);
|
||||||
timerSettings.addItem(m3);
|
timerSettings.addItem(m3);
|
||||||
@@ -1180,12 +1190,7 @@ int CTimerList::newTimer()
|
|||||||
strcpy(timerNew_channel_name,"---");
|
strcpy(timerNew_channel_name,"---");
|
||||||
CMenuForwarder* m6 = new CMenuForwarder(LOCALE_TIMERLIST_CHANNEL, true, timerNew_channel_name, &mm);
|
CMenuForwarder* m6 = new CMenuForwarder(LOCALE_TIMERLIST_CHANNEL, true, timerNew_channel_name, &mm);
|
||||||
|
|
||||||
CMountChooser recDirs(LOCALE_TIMERLIST_RECORDING_DIR,NEUTRINO_ICON_SETTINGS,NULL,timerNew.recordingDir,g_settings.network_nfs_recordingdir);
|
CMenuForwarder* m7 = new CMenuForwarder(LOCALE_TIMERLIST_RECORDING_DIR, true,timerNew.recordingDir, this, "rec_dir2", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
|
||||||
if (!recDirs.hasItem())
|
|
||||||
{
|
|
||||||
printf("[CTimerList] warning: no network devices available\n");
|
|
||||||
}
|
|
||||||
CMenuForwarder* m7 = new CMenuForwarder(LOCALE_TIMERLIST_RECORDING_DIR, recDirs.hasItem(),timerNew.recordingDir, &recDirs);
|
|
||||||
|
|
||||||
CMenuOptionChooser* m8 = new CMenuOptionChooser(LOCALE_TIMERLIST_STANDBY, &timerNew_standby_on, TIMERLIST_STANDBY_OPTIONS, TIMERLIST_STANDBY_OPTION_COUNT, false);
|
CMenuOptionChooser* m8 = new CMenuOptionChooser(LOCALE_TIMERLIST_STANDBY, &timerNew_standby_on, TIMERLIST_STANDBY_OPTIONS, TIMERLIST_STANDBY_OPTION_COUNT, false);
|
||||||
|
|
||||||
|
@@ -4079,12 +4079,13 @@ printf("radioMode: rezap %s\n", rezap ? "yes" : "no");
|
|||||||
void CNeutrinoApp::startNextRecording()
|
void CNeutrinoApp::startNextRecording()
|
||||||
{
|
{
|
||||||
if ((recordingstatus == 0) && (nextRecordingInfo != NULL)) {
|
if ((recordingstatus == 0) && (nextRecordingInfo != NULL)) {
|
||||||
bool doRecord = true;
|
bool doRecord = false;
|
||||||
if (CVCRControl::getInstance()->isDeviceRegistered()) {
|
if (CVCRControl::getInstance()->isDeviceRegistered()) {
|
||||||
recording_id = nextRecordingInfo->eventID;
|
recording_id = nextRecordingInfo->eventID;
|
||||||
if (g_settings.recording_type == RECORDING_FILE) {
|
if (g_settings.recording_type == RECORDING_FILE) {
|
||||||
char *recordingDir = strlen(nextRecordingInfo->recordingDir) > 0 ?
|
char *recordingDir = strlen(nextRecordingInfo->recordingDir) > 0 ?
|
||||||
nextRecordingInfo->recordingDir : g_settings.network_nfs_recordingdir;
|
nextRecordingInfo->recordingDir : g_settings.network_nfs_recordingdir;
|
||||||
|
#if 0
|
||||||
if (!CFSMounter::isMounted(recordingDir)) {
|
if (!CFSMounter::isMounted(recordingDir)) {
|
||||||
doRecord = false;
|
doRecord = false;
|
||||||
for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) {
|
for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) {
|
||||||
@@ -4110,14 +4111,19 @@ void CNeutrinoApp::startNextRecording()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!doRecord) {
|
}
|
||||||
|
#endif
|
||||||
|
if(!check_dir(recordingDir)){
|
||||||
|
doRecord = true;
|
||||||
|
}
|
||||||
|
if (!doRecord) {
|
||||||
// recording dir does not seem to exist in config anymore
|
// recording dir does not seem to exist in config anymore
|
||||||
// or an error occured while mounting
|
// or an error occured while mounting
|
||||||
// -> try default dir
|
// -> try default dir
|
||||||
recordingDir = g_settings.network_nfs_recordingdir;
|
recordingDir = g_settings.network_nfs_recordingdir;
|
||||||
doRecord = true;
|
doRecord = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(static_cast<CVCRControl::CFileDevice*>(recordingdevice))->Directory = std::string(recordingDir);
|
(static_cast<CVCRControl::CFileDevice*>(recordingdevice))->Directory = std::string(recordingDir);
|
||||||
printf("CNeutrinoApp::startNextRecording: start to dir %s\n", recordingDir);
|
printf("CNeutrinoApp::startNextRecording: start to dir %s\n", recordingDir);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user