diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 262c4fb43..242a65ea6 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -489,8 +489,6 @@ eventlistbar.channelswitch Umschalten eventlistbar.eventsort Sortieren eventlistbar.recordevent Aufnehmen extra.add_to_bouquet dem Bouquet zufügen -extra.auto_delete Automatisches Löschen -extra.auto_timeshift Automatische Aufnahme extra.cache_txt Teletext zwischenspeichern extra.chadded Der aktuelle Kanal wird dem selektierten Bouquet hinzugefügt ...\n extra.chalreadyinbq Der aktuelle Kanal ist bereits im selektierten Bouquet.\n @@ -559,8 +557,10 @@ extra.sms_channel SMS-Modus bei Kanalsuche extra.sms_movie SMS-Modus bei Filmsuche extra.south Süden extra.start_tostandby Standby nach Boxstart -extra.temp_timeshift Temporäres Timeshift +extra.timeshift_auto Automatische Aufnahme +extra.timeshift_delete Automatisches Löschen extra.timeshift_pause Pausierte Aufnahme +extra.timeshift_temp Temporäres Timeshift extra.tp_bandwidth Bandbreite extra.tp_bandwidth_10mhz 10Mhz extra.tp_bandwidth_1_712mhz 1.712Mhz diff --git a/data/locale/english.locale b/data/locale/english.locale index b549f1774..9a2b0a27f 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -489,8 +489,6 @@ eventlistbar.channelswitch schedule eventlistbar.eventsort sorting eventlistbar.recordevent record extra.add_to_bouquet Add to bouquet -extra.auto_delete Automatic deletion -extra.auto_timeshift Automatic recording extra.cache_txt Cache teletext extra.chadded The current channel has been added to selected bouquet.\n extra.chalreadyinbq The current channel is already in selected bouquet.\n @@ -559,8 +557,10 @@ extra.sms_channel SMS-mode channel extra.sms_movie SMS-mode movie extra.south South extra.start_tostandby Startup to standby -extra.temp_timeshift Temporary timeshift +extra.timeshift_auto Automatic recording +extra.timeshift_delete Automatic deletion extra.timeshift_pause Paused recording +extra.timeshift_temp Temporary timeshift extra.tp_bandwidth Bandwidth extra.tp_bandwidth_10mhz 10Mhz extra.tp_bandwidth_1_712mhz 1.712Mhz diff --git a/src/driver/record.cpp b/src/driver/record.cpp index f55d73c27..747662fa9 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -190,7 +190,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel) { time_t msg_start_time = time(0); CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_RECORDING_START)); - if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg) + if ((!(autoshift && g_settings.timeshift_auto)) && g_settings.recording_startstop_msg) hintBox.paint(); //NI wakeup_hdd(Directory.c_str()); @@ -311,7 +311,7 @@ bool CRecordInstance::Stop(bool remove_event) recMovieInfo->length = (end_time - start_time + 30) / 60; CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, rec_stop_msg.c_str()); - if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg) + if ((!(autoshift && g_settings.timeshift_auto)) && g_settings.recording_startstop_msg) hintBox.paint(); printf("%s: channel %" PRIx64 " recording_id %d\n", __func__, channel_id, recording_id); @@ -327,7 +327,7 @@ bool CRecordInstance::Stop(bool remove_event) if (autoshift && move_ts2rec) CMoviePlayerGui::getInstance().moveTimeshift(); - else if (autoshift && g_settings.auto_delete) + else if (autoshift && g_settings.timeshift_delete) CMoviePlayerGui::getInstance().deleteTimeshift(); if(recording_id && remove_event) { @@ -1353,8 +1353,8 @@ int CRecordManager::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data { if(msg == NeutrinoMessages::EVT_ZAP_COMPLETE) { g_RCInput->killTimer (shift_timer); - if (g_settings.auto_timeshift) { - int delay = g_settings.auto_timeshift; + if (g_settings.timeshift_auto) { + int delay = g_settings.timeshift_auto; shift_timer = g_RCInput->addTimer(delay*1000*1000, true); g_InfoViewer->handleMsg(NeutrinoMessages::EVT_RECORDMODE, 1); } @@ -1403,7 +1403,7 @@ void CRecordManager::StartTimeshift() t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); // bool tstarted = false; /* start temporary timeshift if enabled and not running, but dont start second record */ - if (g_settings.temp_timeshift) { + if (g_settings.timeshift_temp) { if (!FindTimeshift()) { res = StartAutoRecord(); tmode = "timeshift"; // record just started @@ -1423,7 +1423,7 @@ void CRecordManager::StartTimeshift() ShowMenu() moved to movieplayer.cpp Function is called when stop key is pressed. */ - if(g_settings.temp_timeshift && tstarted && autoshift) + if(g_settings.timeshift_temp && tstarted && autoshift) ShowMenu(); #endif } @@ -2141,7 +2141,7 @@ bool CStreamRec::Stop(bool remove_event) time_t end_time = time_monotonic(); CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, rec_stop_msg.c_str()); - if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg) + if ((!(autoshift && g_settings.timeshift_auto)) && g_settings.recording_startstop_msg) hintBox.paint(); printf("%s: Stopping...\n", __FUNCTION__); @@ -2177,7 +2177,7 @@ record_error_msg_t CStreamRec::Record() APIDList apid_list; CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_RECORDING_START)); - if ((!(autoshift && g_settings.auto_timeshift)) && g_settings.recording_startstop_msg) + if ((!(autoshift && g_settings.timeshift_auto)) && g_settings.recording_startstop_msg) hintBox.paint(); printf("%s: channel %" PRIx64 " recording_id %d\n", __func__, channel_id, recording_id); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index ba78a5a91..b73900df9 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1231,7 +1231,7 @@ void CChannelList::zapToChannel(CZapitChannel *channel, bool force) } if(new_zap_mode != 2 /* not active */) { /* remove recordModeActive from infobar */ - if(g_settings.auto_timeshift && !CNeutrinoApp::getInstance()->recordingstatus) + if(g_settings.timeshift_auto && !CNeutrinoApp::getInstance()->recordingstatus) g_InfoViewer->handleMsg(NeutrinoMessages::EVT_RECORDMODE, 0); g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR, 0 ); diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index ecd86f9f7..eb4ec9fa0 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -397,17 +397,17 @@ void CRecordSetup::showRecordTimeShiftSetup(CMenuWidget *menu_ts) mc->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT_PAUSE); menu_ts->addItem(mc); - CMenuOptionNumberChooser * mn = new CMenuOptionNumberChooser(LOCALE_EXTRA_AUTO_TIMESHIFT, &g_settings.auto_timeshift, true, 0, 300, NULL); + CMenuOptionNumberChooser * mn = new CMenuOptionNumberChooser(LOCALE_EXTRA_TIMESHIFT_AUTO, &g_settings.timeshift_auto, true, 0, 300, NULL); mn->setNumberFormat(g_Locale->getText(LOCALE_WORD_AFTER) + std::string(" %d ") + g_Locale->getText(LOCALE_UNIT_SHORT_SECOND)); mn->setLocalizedValue(0, LOCALE_OPTIONS_OFF); mn->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT_AUTO); menu_ts->addItem(mn); - mc = new CMenuOptionChooser(LOCALE_EXTRA_AUTO_DELETE, &g_settings.auto_delete, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc = new CMenuOptionChooser(LOCALE_EXTRA_TIMESHIFT_DELETE, &g_settings.timeshift_delete, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT_DELETE); menu_ts->addItem(mc); - mc = new CMenuOptionChooser(LOCALE_EXTRA_TEMP_TIMESHIFT, &g_settings.temp_timeshift, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + mc = new CMenuOptionChooser(LOCALE_EXTRA_TIMESHIFT_TEMP, &g_settings.timeshift_temp, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_RECORD_TIMESHIFT_TEMP); menu_ts->addItem(mc); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 4f8064b6c..2f9d8eae8 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -695,9 +695,9 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.last_webradio_dir = configfile.getString( "last_webradio_dir", WEBRADIODIR_VAR); g_settings.last_webtv_dir = configfile.getString( "last_webtv_dir", WEBTVDIR_VAR); - g_settings.temp_timeshift = configfile.getInt32( "temp_timeshift", 1 ); //NI - g_settings.auto_timeshift = configfile.getInt32( "auto_timeshift", 0 ); - g_settings.auto_delete = configfile.getInt32( "auto_delete", 1 ); + g_settings.timeshift_temp = configfile.getInt32( "timeshift_temp", 1 ); + g_settings.timeshift_auto = configfile.getInt32( "timeshift_auto", 0 ); + g_settings.timeshift_delete = configfile.getInt32( "timeshift_delete", 1 ); std::string timeshiftDir; if(g_settings.timeshiftdir.empty()) { @@ -715,7 +715,7 @@ int CNeutrinoApp::loadSetup(const char * fname) CRecordManager::getInstance()->SetTimeshiftDirectory(timeshiftDir.c_str()); // remove old timeshift recordings - if (g_settings.auto_delete) + if (g_settings.timeshift_delete) { /* Why only remove old timeshift recordings @@ -1316,6 +1316,16 @@ void CNeutrinoApp::upgradeSetup(const char * fname) if (g_settings.lcd4l_skin == 4) g_settings.lcd4l_skin = 100; } + if (g_settings.version_pseudo < "20190115220100") + { + // rename timeshift keys + g_settings.timeshift_auto = configfile.getInt32("auto_timeshift", 0); + configfile.deleteKey("auto_timeshift"); + g_settings.timeshift_temp = configfile.getInt32("temp_timeshift", 1); + configfile.deleteKey("temp_timeshift"); + g_settings.timeshift_delete = configfile.getInt32("auto_delete", 1); + configfile.deleteKey("auto_delete"); + } g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO; configfile.setString("version_pseudo", g_settings.version_pseudo); @@ -1659,11 +1669,13 @@ void CNeutrinoApp::saveSetup(const char * fname) saveKeys(); configfile.setInt32( "timeshift_pause", g_settings.timeshift_pause ); - configfile.setInt32( "temp_timeshift", g_settings.temp_timeshift ); - configfile.setInt32( "auto_timeshift", g_settings.auto_timeshift ); - configfile.setInt32( "auto_delete", g_settings.auto_delete ); + configfile.setInt32( "timeshift_temp", g_settings.timeshift_temp ); + configfile.setInt32( "timeshift_auto", g_settings.timeshift_auto ); + configfile.setInt32( "timeshift_delete", g_settings.timeshift_delete ); + configfile.setInt32( "record_hours", g_settings.record_hours ); configfile.setInt32( "timeshift_hours", g_settings.timeshift_hours ); + //printf("set: key_unlock =============== %d\n", g_settings.key_unlock); configfile.setInt32( "screenshot_count", g_settings.screenshot_count ); configfile.setInt32( "screenshot_format", g_settings.screenshot_format ); diff --git a/src/system/locals.h b/src/system/locals.h index ba72aba5a..ab245ed02 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -516,8 +516,6 @@ typedef enum LOCALE_EVENTLISTBAR_EVENTSORT, LOCALE_EVENTLISTBAR_RECORDEVENT, LOCALE_EXTRA_ADD_TO_BOUQUET, - LOCALE_EXTRA_AUTO_DELETE, - LOCALE_EXTRA_AUTO_TIMESHIFT, LOCALE_EXTRA_CACHE_TXT, LOCALE_EXTRA_CHADDED, LOCALE_EXTRA_CHALREADYINBQ, @@ -586,8 +584,10 @@ typedef enum LOCALE_EXTRA_SMS_MOVIE, LOCALE_EXTRA_SOUTH, LOCALE_EXTRA_START_TOSTANDBY, - LOCALE_EXTRA_TEMP_TIMESHIFT, + LOCALE_EXTRA_TIMESHIFT_AUTO, + LOCALE_EXTRA_TIMESHIFT_DELETE, LOCALE_EXTRA_TIMESHIFT_PAUSE, + LOCALE_EXTRA_TIMESHIFT_TEMP, LOCALE_EXTRA_TP_BANDWIDTH, LOCALE_EXTRA_TP_BANDWIDTH_10MHZ, LOCALE_EXTRA_TP_BANDWIDTH_1_712MHZ, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index ca6a9b5b3..8ce0cace6 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -516,8 +516,6 @@ const char * locale_real_names[] = "eventlistbar.eventsort", "eventlistbar.recordevent", "extra.add_to_bouquet", - "extra.auto_delete", - "extra.auto_timeshift", "extra.cache_txt", "extra.chadded", "extra.chalreadyinbq", @@ -586,7 +584,9 @@ const char * locale_real_names[] = "extra.sms_movie", "extra.south", "extra.start_tostandby", - "extra.temp_timeshift", + "extra.timeshift_delete", + "extra.timeshift_auto", + "extra.timeshift_temp", "extra.timeshift_pause", "extra.tp_bandwidth", "extra.tp_bandwidth_10mhz", diff --git a/src/system/settings.h b/src/system/settings.h index 0dcc88895..e9bddc108 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -522,6 +522,13 @@ struct SNeutrinoSettings std::string recording_filename_template; int recording_already_found_check; + // timeshift + int timeshift_pause; + int timeshift_auto; + int timeshift_temp; + int timeshift_delete; + int timeshift_hours; + int filesystem_is_utf8; // default plugin for ts-movieplayer (red button) std::string movieplayer_plugin; @@ -559,12 +566,7 @@ struct SNeutrinoSettings int key_power_off; int key_standby_off_add; int menu_left_exit; - int timeshift_pause; - int auto_timeshift; - int temp_timeshift; - int auto_delete; int record_hours; - int timeshift_hours; int key_record; int key_help; int key_next43mode; diff --git a/version_pseudo.h b/version_pseudo.h index 98d5e6f7d..6bd44c022 100644 --- a/version_pseudo.h +++ b/version_pseudo.h @@ -1 +1 @@ -#define NEUTRINO_VERSION_PSEUDO "20190106000000" +#define NEUTRINO_VERSION_PSEUDO "20190115000000"