diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 262c4fb43..ecc11b914 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -2398,7 +2398,6 @@ recordingmenu.multimenu.info_stop_all %d von %d Aufnahmen werden beendet. recordingmenu.multimenu.rec_akt Starte Aufnahme recordingmenu.multimenu.stop_all Alle Aufnahmen beenden recordingmenu.multimenu.timeshift Starte Timeshift -recordingmenu.multimenu.timeshift2record Behalte Timeshift-Aufnahme nach Beendigung recordingmenu.off aus recordingmenu.record_is_not_running Keine laufende Aufnahme verfügbar! recordingmenu.record_is_running Aufnahme läuft! diff --git a/src/driver/record.cpp b/src/driver/record.cpp index b3b80c2b3..235786529 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -134,7 +134,6 @@ CRecordInstance::CRecordInstance(const CTimerd::RecordingInfo * const eventinfo, Directory = dir; autoshift = timeshift; - move_ts2rec = false; numpids = 0; cMovieInfo = new CMovieInfo(); @@ -325,9 +324,7 @@ bool CRecordInstance::Stop(bool remove_event) CCamManager::getInstance()->Stop(channel_id, CCamManager::RECORD); - if (autoshift && move_ts2rec) - CMoviePlayerGui::getInstance().moveTimeshift(); - else if (autoshift && g_settings.auto_delete) + if (autoshift && g_settings.auto_delete) CMoviePlayerGui::getInstance().deleteTimeshift(); if(recording_id && remove_event) { @@ -1515,15 +1512,6 @@ int CRecordManager::exec(CMenuTarget* parent, const std::string & actionKey ) { StartTimeshift(); return menu_return::RETURN_EXIT_ALL; - } else if(actionKey == "Timeshift2Record") - { - for (recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) - { - CRecordInstance *inst = it->second; - if (inst->Timeshift()) - inst->move_ts2rec = !inst->move_ts2rec; - } - return menu_return::RETURN_REPAINT; } else if(actionKey == "Stop_record") { if (!CRecordManager::getInstance()->RecordingStatus()) @@ -1565,33 +1553,17 @@ bool CRecordManager::ShowMenu(void) //bool status_rec = rec_mode & RECMODE_REC; //record item - iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_REC_AKT, true /*!status_rec*/, NULL, this, "Record", CRCInput::RC_red); + iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_REC_AKT, true /*!status_rec*/, NULL, + this, "Record", CRCInput::RC_red); //if no recordings are running, set the focus to the record menu item menu.addItem(iteml, rec_count == 0 ? true: false); //timeshift item - if (!status_ts) - { - iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT, true /*!status_ts*/, NULL, this, "Timeshift", CRCInput::RC_yellow); - } - else - { - iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT2RECORD, true, NULL, this, "Timeshift2Record", CRCInput::RC_yellow); - for (recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) - { - CRecordInstance *inst = it->second; - if (inst->Timeshift()) - { - if (inst->move_ts2rec) - iteml->iconName_Info_right = NEUTRINO_ICON_MARKER_DIALOG_OK; - else - iteml->iconName_Info_right = NEUTRINO_ICON_MARKER_DIALOG_OFF; - } - } - } + iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT, !status_ts, NULL, + this, "Timeshift", CRCInput::RC_yellow); menu.addItem(iteml, false); - if (rec_count > 0) + if(rec_count > 0) { menu.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_RECORDING_STOP)); mutex.lock(); @@ -1615,8 +1587,7 @@ bool CRecordManager::ShowMenu(void) //define stop key if only one record is running, otherwise define shortcuts neutrino_msg_t rc_key = CRCInput::convertDigitToKey(shortcut++); const char * btn_icon = NEUTRINO_ICON_BUTTON_OKAY; - if (rec_count == 1) - { + if (rec_count == 1){ rc_key = CRCInput::RC_stop; btn_icon = NEUTRINO_ICON_BUTTON_STOP; } @@ -1629,10 +1600,11 @@ bool CRecordManager::ShowMenu(void) if (i >= RECORD_MAX_COUNT) break; } - if (i > 1) //menu item "stopp all records" + if(i > 1) //menu item "stopp all records" { menu.addItem(GenericMenuSeparatorLine); - iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_STOP_ALL, true, NULL, this, "StopAll", CRCInput::RC_stop); + iteml = new CMenuForwarder(LOCALE_RECORDINGMENU_MULTIMENU_STOP_ALL, true, NULL, + this, "StopAll", CRCInput::RC_stop); iteml->setItemButton(NEUTRINO_ICON_BUTTON_STOP, true); //if more than one recording is running, set the focus to menu item 'stopp all records' diff --git a/src/driver/record.h b/src/driver/record.h index e67a7b6d9..ee225911a 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -131,7 +131,6 @@ class CRecordInstance const char * GetFileName() { return filename; }; bool Timeshift() { return autoshift; }; int tshift_mode; - bool move_ts2rec; void SetStopMessage(const char* text) {rec_stop_msg = text;} ; //NI #if 0 diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 4a1629aa6..15395a44b 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1109,17 +1109,15 @@ void CInfoViewer::loop(bool show_dot) showLivestreamInfo(); //NI - if (msg == CRCInput::RC_help && g_settings.show_ecm_pos) - { - if (g_settings.show_ecm) - { - g_settings.show_ecm = 0; - ecmInfoBox_hide(); - } - else - { - g_settings.show_ecm = 1; - infoViewerBB->paint_ca_icons(0); + if (msg == CRCInput::RC_help) { + if (g_settings.show_ecm_pos) { + if (g_settings.show_ecm) { + g_settings.show_ecm = 0; + ecmInfoBox_hide(); + } else { + g_settings.show_ecm = 1; + infoViewerBB->paint_ca_icons(0); + } } g_RCInput->clearRCMsg(); setInfobarTimeout(); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index efc78472f..b876a9046 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -596,7 +596,6 @@ void CMoviePlayerGui::Cleanup() p_movie_info = NULL; autoshot_done = false; timeshift_deletion = false; - timeshift_to_record = false; currentaudioname = "Unk"; } @@ -2073,36 +2072,18 @@ void CMoviePlayerGui::PlayFileEnd(bool restore) stopped = true; printf("%s: stopped\n", __func__); - if (file_name.find("_temp.ts") == file_name.size() - 8) + if (timeshift_deletion && (file_name.find("_temp.ts") == file_name.size() - 8)) { - std::string ts_file = file_name; - std::string xml_file; + std::string file = file_name; + printf("%s: delete %s\n", __func__, file.c_str()); + unlink(file.c_str()); CMovieInfo mi; - if (!mi.convertTs2XmlName(xml_file)) - xml_file.clear(); - - if (timeshift_to_record) + if (mi.convertTs2XmlName(file)) { - printf("%s: move %s\n", __func__, ts_file.c_str()); - //move here - if (!xml_file.empty()) - { - printf("%s: move %s\n", __func__, xml_file.c_str()); - //move here - } - timeshift_to_record = false; - } - else if (timeshift_deletion) - { - printf("%s: delete %s\n", __func__, ts_file.c_str()); - unlink(ts_file.c_str()); - if (!xml_file.empty()) - { - printf("%s: delete %s\n", __func__, xml_file.c_str()); - unlink(xml_file.c_str()); - } - timeshift_deletion = false; + printf("%s: delete %s\n", __func__, file.c_str()); + unlink(file.c_str()); } + timeshift_deletion = false; } if (!filelist.empty() && filelist_it != filelist.end()) { diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index bf085236d..d03350ddc 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -175,7 +175,6 @@ class CMoviePlayerGui : public CMenuTarget int menu_ret; bool autoshot_done; bool timeshift_deletion; - bool timeshift_to_record; //std::vector liveStreamList; /* playback from bookmark */ @@ -253,7 +252,6 @@ class CMoviePlayerGui : public CMenuTarget void UpdatePosition(); int timeshift; void deleteTimeshift() { timeshift_deletion = true; } - void moveTimeshift() { timeshift_to_record = true; } int file_prozent; cPlayback *getPlayback() { return playback; } void SetFile(std::string &name, std::string &file, std::string info1="", std::string info2="") { pretty_name = name; file_name = file; info_1 = info1; info_2 = info2; } diff --git a/src/system/locals.h b/src/system/locals.h index ba72aba5a..069c2298f 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -2425,7 +2425,6 @@ typedef enum LOCALE_RECORDINGMENU_MULTIMENU_REC_AKT, LOCALE_RECORDINGMENU_MULTIMENU_STOP_ALL, LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT, - LOCALE_RECORDINGMENU_MULTIMENU_TIMESHIFT2RECORD, LOCALE_RECORDINGMENU_OFF, LOCALE_RECORDINGMENU_RECORD_IS_NOT_RUNNING, LOCALE_RECORDINGMENU_RECORD_IS_RUNNING, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index ca6a9b5b3..1775187a0 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -2425,7 +2425,6 @@ const char * locale_real_names[] = "recordingmenu.multimenu.rec_akt", "recordingmenu.multimenu.stop_all", "recordingmenu.multimenu.timeshift", - "recordingmenu.multimenu.timeshift2record", "recordingmenu.off", "recordingmenu.record_is_not_running", "recordingmenu.record_is_running",