diff --git a/configure.ac b/configure.ac index 1e4d3f493..3629b5673 100644 --- a/configure.ac +++ b/configure.ac @@ -262,16 +262,16 @@ if test "$BOXTYPE" = "coolstream"; then if test -e ${srcdir}/lib/libcoolstream/nevis_ir.h; then AC_DEFINE(HAVE_COOLSTREAM_NEVIS_IR_H,1,[Define to 1 if you have the header file.]) fi -HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream' +HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream -I$(top_srcdir)/src/zapit/include/private' if test "$BOXMODEL" = "apollo"; then -HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2' if test -e ${srcdir}/lib/libcoolstream2/cs_ir_generic.h; then AC_DEFINE(HAVE_COOLSTREAM_CS_IR_GENERIC_H,1,[Define to 1 if you have the header file.]) fi if test -e ${srcdir}/lib/libcoolstream2/cs_frontpanel.h; then AC_DEFINE(HAVE_COOLSTREAM_CS_FRONTPANEL_H,1,[Define to 1 if you have the header file.]) fi +HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2 -I$(top_srcdir)/src/zapit/include/private' fi fi diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index b99e5657a..4382c1808 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1444,7 +1444,6 @@ menu.hint_record_fill_warn Zeige Warnung, wenn das Aufnahmemedium zu voll wird menu.hint_record_slow_warn Zeige Warnung, wenn der Aufnahmepuffer zu überlaufen droht menu.hint_record_startstop_msg Schaltet die Meldung bei Aufnahmestart/ende ein oder aus. menu.hint_record_tdir Wählen Sie ein Verzeichnis für Ihre Timeshift-Aufnahmen im temporären Timeshift-Modus -menu.hint_record_tevents Beim Wählen der Aufnahme aus dem EPG heraus die Terminliste anzeigen, auch wenn keine weiteren Termine vorhanden sind menu.hint_record_time Aufzeichnungsdauer vor dem Stopp bei der Verwendung von Direktaufzeichnung mit Record-Taste. menu.hint_record_time_ts Timeshiftdauer vor dem Stopp, wenn temporäres Timeshift aktiviert. menu.hint_record_timeafter Stellen Sie die Nachlaufzeit für Timer-Aufnahmen ein\nEin Wert von 2 beendet die Aufnahme 2 Minuten nach dem Sendungsende @@ -1588,6 +1587,7 @@ menu.hint_subchannel_pos Wählen Sie die Anzeigeposition der Unterkanäle aus menu.hint_sw_update Neutrino aktualisieren, Image sichern und wiederherstellen menu.hint_theme Wählen Sie ein vordefiniertes Farbschema, speichern oder laden Sie ihre eigenen Farbschemata menu.hint_timeouts Gibt an, nach welcher Zeit in Sekunden die Menüs oder Infofenster sich automatisch schließen (0 deaktiviert) +menu.hint_timer_followscreenings Zeige Terminauswahl mit Folge-Events zur Timerprogrammierung. "Immer" zeigt die Auswahl auch dann, wenn nur ein Event gefunden wurde. menu.hint_timers Hinzufügen, entfernen und bearbeiten geplanter Aufnahmen oder anderer Timer menu.hint_timezone Wählen Sie ihre Zeitzone aus menu.hint_tmdb_api_key Geben Sie den TMDb API Schlüssel ein. Eine leere Eingabe schaltet die TMDb-Unterstützung aus @@ -1794,7 +1794,7 @@ moviebrowser.book_name Name: moviebrowser.book_new Neue Markierung moviebrowser.book_no_end Keine Endmarkierung gefunden moviebrowser.book_position Position: -moviebrowser.book_type Sprung (<0 zurück, >0 vor): +moviebrowser.book_type Sprung (<0: zurück, >0: vor): moviebrowser.book_type_backward Wiederholung moviebrowser.book_type_forward Überspringen moviebrowser.browser_additional Zusätzliche Informationen @@ -1817,13 +1817,13 @@ moviebrowser.delete_screenshot Lösche Screenshot? moviebrowser.dir Pfad moviebrowser.directories Verzeichnisse moviebrowser.directories_additional Zusätzliche Verzeichnisse -moviebrowser.edit_book Bookmark Ändern +moviebrowser.edit_book Markierung ändern moviebrowser.edit_book_name_info1 Neuer Markierungsname -moviebrowser.edit_book_name_info2 Markierungsname info2 +moviebrowser.edit_book_name_info2 moviebrowser.edit_book_pos_info1 Neue Position (s) moviebrowser.edit_book_pos_info2 moviebrowser.edit_book_type_info1 Neue Sprunglänge (s) -moviebrowser.edit_book_type_info2 <0 zurück , >0 vor, 0: kein +moviebrowser.edit_book_type_info2 <0: zurück, >0: vor, 0: kein moviebrowser.edit_serie Name der Serie moviebrowser.error_no_movies Keine Filme gefunden moviebrowser.filter_off Filter aus @@ -2123,6 +2123,7 @@ opkg.update.check Prüfe auf Updates... opkg.update.reading_lists Paketlisten werden eingelesen... opkg.upgrade Installierte Pakete aktualisieren opkg.warning_3rdparty_packages Drittanbieter-Pakete könnten Ihr System beschädigen! Sind Sie sicher, dieses Paket zu installieren? +options.always immer options.default Voreinstellungen benutzen options.fb framebuffer options.hint_default Setzen Sie die Werte auf die Voreinstellung zurück. @@ -2314,7 +2315,6 @@ recordingmenu.server Server recordingmenu.server_mac MAC-Adresse recordingmenu.setupnow Einstellungen jetzt übernehmen recordingmenu.slow_warn Warnung bei langsamen Aufnahmemedien -recordingmenu.tevents Timer Auswahlliste immer anzeigen recordingmenu.timeshift Timeshift recordingmenu.tsdir Timeshift Aufnahmeverzeichnis recordingmenu.vcr Videorekorder @@ -2616,6 +2616,7 @@ timerlist.type.zapto Umschalten timerlist.weekdays Wochentage timerlist.weekdays.hint_1 Mo Di Mi Do Fr Sa So timerlist.weekdays.hint_2 'X'=Timer '-' kein Timer +timersettings.followscreenings Zeige Terminauswahl timersettings.record_safety_time_after Aufnahmeende-Korrektur timersettings.record_safety_time_after.hint_1 Korrekturzeit in Min. (00=aus), die auf die End- timersettings.record_safety_time_after.hint_2 zeit des jeweiligen Timers addiert wird diff --git a/data/locale/english.locale b/data/locale/english.locale index 54eaac357..57c1cbfa1 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1444,7 +1444,6 @@ menu.hint_record_fill_warn Show warning, when record medium is nearly full menu.hint_record_slow_warn Show warning, when record buffer is close to overflow menu.hint_record_startstop_msg Turns the message when recording start/end on or off. menu.hint_record_tdir Select directory to save timeshift recordings\nin temporary timeshift mode -menu.hint_record_tevents When choosing recording from EPG, view Timer list even no further entries found menu.hint_record_time Record duration before stop when\nusing direct record with record button menu.hint_record_time_ts Timeshift duration before stop when\ntemporary timeshift enabled menu.hint_record_timeafter Stop record after event end\nin minutes @@ -1588,6 +1587,7 @@ menu.hint_subchannel_pos Select subchannels menu position menu.hint_sw_update Update software menu.hint_theme Select pre-defined color theme\nSave or load theme from files menu.hint_timeouts Configure time to hide GUI windows\nin seconds +menu.hint_timer_followscreenings Show selection with followscreenings for timer programming. "Always" shows selection even if just one event is found. menu.hint_timers Add/Remove/Edit scheduled\nrecording, reminders etc. menu.hint_timezone Select your timezone menu.hint_tmdb_api_key Type your TMDb API key. An empty input disables TMDb support @@ -1789,14 +1789,14 @@ moviebrowser.book_clear_all Clear all moviebrowser.book_head Bookmarks moviebrowser.book_lastmoviestop Last play stop: moviebrowser.book_movieend Movie end: -moviebrowser.book_moviestart User Movie start: +moviebrowser.book_moviestart Movie start: moviebrowser.book_name Name: -moviebrowser.book_new New Bookmark -moviebrowser.book_no_end No end bookmark defined +moviebrowser.book_new New bookmark +moviebrowser.book_no_end No end mark defined moviebrowser.book_position Position: -moviebrowser.book_type Jump (<0 back , >0 for): +moviebrowser.book_type Jump (<0: backward, >0: forward): moviebrowser.book_type_backward Repeat -moviebrowser.book_type_forward jump over +moviebrowser.book_type_forward Jump over moviebrowser.browser_additional Additional informations moviebrowser.browser_frame_high Browser height [%] moviebrowser.browser_row_head Row settings @@ -1817,13 +1817,13 @@ moviebrowser.delete_screenshot Delete screenshot? moviebrowser.dir Path moviebrowser.directories Directories moviebrowser.directories_additional Additional directories -moviebrowser.edit_book Bookmark change -moviebrowser.edit_book_name_info1 Enter new Bookmark name -moviebrowser.edit_book_name_info2 book name info2 -moviebrowser.edit_book_pos_info1 Enter new Position (s) +moviebrowser.edit_book Change bookmark +moviebrowser.edit_book_name_info1 Enter new bookmark name +moviebrowser.edit_book_name_info2 +moviebrowser.edit_book_pos_info1 Enter new position (s) moviebrowser.edit_book_pos_info2 moviebrowser.edit_book_type_info1 Enter new jump length (s) -moviebrowser.edit_book_type_info2 <0 back , >0 for, 0: none +moviebrowser.edit_book_type_info2 <0: backward, >0: forward, 0: none moviebrowser.edit_serie Enter name of serie moviebrowser.error_no_movies No movies found moviebrowser.filter_off Filter off @@ -2123,6 +2123,7 @@ opkg.update.check Checking for updates... opkg.update.reading_lists Reading package lists... opkg.upgrade Upgrade installed packages opkg.warning_3rdparty_packages 3rd party packages could damage your system! Are you sure install this package? +options.always always options.default Reset to defaults options.fb framebuffer options.hint_default Reset the values to their defaults @@ -2313,7 +2314,6 @@ recordingmenu.server server recordingmenu.server_mac MAC address recordingmenu.setupnow Activate changes recordingmenu.slow_warn Enable slow record warning -recordingmenu.tevents Always show timer pick list recordingmenu.timeshift Timeshift recordingmenu.tsdir Timeshift directory recordingmenu.vcr vcr @@ -2615,6 +2615,7 @@ timerlist.type.zapto Zap to timerlist.weekdays Days of the week timerlist.weekdays.hint_1 Mo Tu We Th Fr Sa Su timerlist.weekdays.hint_2 'X'=timer '-' no timer +timersettings.followscreenings Show screening selection timersettings.record_safety_time_after Record stop time correction timersettings.record_safety_time_after.hint_1 Correction time in min. (00=off). This time timersettings.record_safety_time_after.hint_2 will added to stop time of every record timer. diff --git a/src/driver/record.cpp b/src/driver/record.cpp index a0248e4cc..84d443bf0 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1819,10 +1819,14 @@ CRecordInstance* CRecordManager::getUseCI() mutex.lock(); for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { CRecordInstance * inst = it->second; - CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(inst->GetChannelId()); - if (channel->bUseCI) { - mutex.unlock(); - return inst; + if (inst) + { + CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(inst->GetChannelId()); + if (channel && channel->bUseCI) + { + mutex.unlock(); + return inst; + } } } mutex.unlock(); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index d7097095f..22a99b22a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -979,14 +979,15 @@ int CChannelList::show() void CChannelList::hide() { + paint_events(-2); // cancel paint_events thread if ((g_settings.channellist_additional == 2) || (previous_channellist_additional == 2)) // with miniTV { if (cc_minitv) delete cc_minitv; cc_minitv = NULL; } - - header->kill(); + if(header) + header->kill(); if (CChannelLogo){ CChannelLogo->kill(); delete CChannelLogo; diff --git a/src/gui/followscreenings.cpp b/src/gui/followscreenings.cpp index 06faafec3..43612b78b 100644 --- a/src/gui/followscreenings.cpp +++ b/src/gui/followscreenings.cpp @@ -68,6 +68,9 @@ CChannelEventList *CFollowScreenings::getFollowScreenings(void) if (e->description != title) continue; followlist.push_back(*e); + + if (followlist.size() == 1 && !g_settings.timer_followscreenings) + break; } } return &followlist; @@ -89,7 +92,7 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK if (i->eventType == CTimerd::TIMER_RECORD) { if (channel_id == i->channel_id && e->startTime == i->epg_starttime) { Timer.removeTimerEvent(i->eventID); - if (!forwarders.empty()) + if (!forwarders.empty() && followlist.size() > 1) forwarders[ix]->iconName_Info_right = ""; #if 0 else @@ -112,13 +115,11 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK e->startTime, e->startTime - (ANNOUNCETIME + 120 ), apids, true, e->startTime - (ANNOUNCETIME + 120) > time(NULL), recDir, true, ch->bUseCI) == -1) { //NI //FIXME -- no error handling, but this shouldn't happen ... } else { - if (!forwarders.empty()) + if (!forwarders.empty() && followlist.size() > 1) forwarders[ix]->iconName_Info_right = NEUTRINO_ICON_REC; -#if 0 else ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); -#endif return menu_return::RETURN_REPAINT; } break; // for @@ -154,7 +155,7 @@ void CFollowScreenings::show() getFollowScreenings(); - if (followlist.size() == 1 && !g_settings.recording_tevents) { //NI + if (followlist.size() == 1 && g_settings.timer_followscreenings < 2 /*always*/) { //NI snprintf(actionstr, sizeof(actionstr), "%lu", followlist.front().startTime); exec(NULL, actionstr); } else { diff --git a/src/gui/lcd4l.cpp b/src/gui/lcd4l.cpp index 13e9fcd86..209cb505d 100644 --- a/src/gui/lcd4l.cpp +++ b/src/gui/lcd4l.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include "lcd4l.h" @@ -57,6 +58,7 @@ extern int bc_popup_icon; #endif extern CRemoteControl *g_RemoteControl; +extern cVideo *videoDecoder; #define LCD_DATADIR "/tmp/lcd/" @@ -69,6 +71,10 @@ extern CRemoteControl *g_RemoteControl; #define LOGO_DUMMY LCD_ICONSDIR "blank.png" +#define RESOLUTION LCD_DATADIR "resolution" +#define ASPECTRATIO LCD_DATADIR "aspectratio" +#define VIDEOTEXT LCD_DATADIR "videotext" +#define DOLBYDIGITAL LCD_DATADIR "dolbydigital" #define TUNER LCD_DATADIR "tuner" #define VOLUME LCD_DATADIR "volume" #define MODE_REC LCD_DATADIR "mode_rec" @@ -190,12 +196,17 @@ void CLCD4l::Init() { m_ParseID = 0; + m_Resolution = "n/a"; + m_AspectRatio = "n/a"; + m_Videotext = -1; + m_DolbyDigital = "n/a"; m_Tuner = -1; m_Volume = -1; m_ModeRec = -1; m_ModeTshift = -1; m_ModeTimer = -1; m_ModeEcm = -1; + m_ModeCamPresent= false; m_ModeCam = -1; #ifdef BP m_ModeNews = -1; @@ -311,6 +322,76 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) /* ----------------------------------------------------------------- */ + int x_res, y_res, framerate; + videoDecoder->getPictureInfo(x_res, y_res, framerate); + + std::string Resolution = to_string(x_res) + "x" + to_string(y_res); + //Resolution += "\n" + to_string(framerate); //TODO + + if (m_Resolution.compare(Resolution)) + { + WriteFile(RESOLUTION, Resolution); + m_Resolution = Resolution; + } + + /* ----------------------------------------------------------------- */ + + std::string AspectRatio; + switch (videoDecoder->getAspectRatio()) + { + case 0: + AspectRatio = "n/a"; + break; + case 1: + AspectRatio = "4:3"; + break; + case 2: + AspectRatio = "14:9"; + break; + case 3: + AspectRatio = "16:9"; + break; + case 4: + AspectRatio = "20:9"; + break; + default: + AspectRatio = "n/k"; + break; + } + + if (m_AspectRatio.compare(AspectRatio)) + { + WriteFile(ASPECTRATIO, AspectRatio); + m_AspectRatio = AspectRatio; + } + + /* ----------------------------------------------------------------- */ + + int Videotext = g_RemoteControl->current_PIDs.PIDs.vtxtpid; + + if (m_Videotext != Videotext) + { + WriteFile(VIDEOTEXT, Videotext ? "yes" : "no"); + m_Videotext = Videotext; + } + + /* ----------------------------------------------------------------- */ + + std::string DolbyDigital; + if ((g_RemoteControl->current_PIDs.PIDs.selected_apid < g_RemoteControl->current_PIDs.APIDs.size()) && + (g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].is_ac3)) + DolbyDigital = "yes"; + else + DolbyDigital = g_RemoteControl->has_ac3 ? "available" : "no"; + + if (m_DolbyDigital.compare(DolbyDigital)) + { + WriteFile(DOLBYDIGITAL, DolbyDigital); + m_DolbyDigital = DolbyDigital; + } + + /* ----------------------------------------------------------------- */ + int Tuner = 1 + CFEManager::getInstance()->getLiveFE()->getNumber(); if (m_Tuner != Tuner) @@ -412,10 +493,13 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) /* ----------------------------------------------------------------- */ - int ModeCam = 0; + if (firstRun) //FIXME; what if module is added/removed while lcd4l is running? + { + for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) + m_ModeCamPresent |= cCA::GetInstance()->ModulePresent(CA_SLOT_TYPE_CI, i); + } - if (CCamManager::getInstance()->getUseCI()) - ModeCam = 1; + int ModeCam = (m_ModeCamPresent && CCamManager::getInstance()->getUseCI()); if (m_ModeCam != ModeCam) { diff --git a/src/gui/lcd4l.h b/src/gui/lcd4l.h index 7506e1b1a..73ab62dfa 100644 --- a/src/gui/lcd4l.h +++ b/src/gui/lcd4l.h @@ -88,12 +88,17 @@ class CLCD4l int m_Mode; int m_ModeChannel; + std::string m_Resolution; + std::string m_AspectRatio; + int m_Videotext; + std::string m_DolbyDigital; int m_Tuner; int m_Volume; int m_ModeRec; int m_ModeTshift; int m_ModeTimer; int m_ModeEcm; + bool m_ModeCamPresent; int m_ModeCam; #ifdef BP int m_ModeNews; diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 3e6753878..3ad86fda7 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -2111,6 +2111,18 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) CMenuWidget m(LOCALE_MOVIEBROWSER_FOOT_SORT, NEUTRINO_ICON_SETTINGS); m.addIntroItems(); + // add PREVPLAYDATE/RECORDDATE sort buttons to footer + m.addKey(CRCInput::RC_red, selector, to_string(MB_INFO_PREVPLAYDATE).c_str()); + m.addKey(CRCInput::RC_green, selector, to_string(MB_INFO_RECORDDATE).c_str()); + + button_label footerButtons[] = { + { NEUTRINO_ICON_BUTTON_RED, LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE}, + { NEUTRINO_ICON_BUTTON_GREEN, LOCALE_MOVIEBROWSER_INFO_RECORDDATE} + }; + int footerButtonsCount = sizeof(footerButtons) / sizeof(button_label); + + m.setFooter(footerButtons, footerButtonsCount); + // just show sorting options for displayed rows; sorted by rows for (int row = 0; row < MB_MAX_ROWS && row < m_settings.browserRowNr; row++) { @@ -2119,6 +2131,10 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) if (sortBy[i] == NULL) continue; + // already added to footer + if (i == MB_INFO_PREVPLAYDATE || i == MB_INFO_RECORDDATE) + continue; + if (m_settings.browserRowItem[row] == i) m.addItem(new CMenuForwarder(g_Locale->getText(m_localizedItemName[i]), true, NULL, selector, to_string(i).c_str(), CRCInput::convertDigitToKey(directkey++))); } @@ -3237,26 +3253,30 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) CMenuWidget bookmarkMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER); bookmarkMenu.addIntroItems(LOCALE_MOVIEBROWSER_BOOK_HEAD); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, true, NULL, this, "book_clear_all",CRCInput::RC_blue)); + bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, true, NULL, this, "book_clear_all", CRCInput::RC_red)); bookmarkMenu.addItem(GenericMenuSeparatorLine); bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, true, bookStartIntInput.getValue(), &bookStartIntInput)); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIEEND, true, bookEndIntInput.getValue(), &bookLastIntInput)); - bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, bookLastIntInput.getValue(), &bookEndIntInput)); + bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIEEND, true, bookEndIntInput.getValue(), &bookEndIntInput)); + bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, bookLastIntInput.getValue(), &bookLastIntInput)); bookmarkMenu.addItem(GenericMenuSeparatorLine); for (int li =0 ; li < MI_MOVIE_BOOK_USER_MAX && li < MAX_NUMBER_OF_BOOKMARK_ITEMS; li++) { - CKeyboardInput * pBookNameInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, &movie_info->bookmarks.user[li].name, 20); - CIntInput *pBookPosIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].pos, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); - CIntInput *pBookTypeIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].length, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO2); + std::string bookmark_user_name = g_Locale->getText(LOCALE_MOVIEBROWSER_BOOK_NEW); + if (!movie_info->bookmarks.user[li].name.empty()) + bookmark_user_name = movie_info->bookmarks.user[li].name; + + CKeyboardInput *pBookNameInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, &movie_info->bookmarks.user[li].name, 20, NULL, NULL, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO2); + CIntInput *pBookPosIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].pos, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2); + CIntInput *pBookTypeIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].length, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO2); CMenuWidget* pBookItemMenu = new CMenuWidget(LOCALE_MOVIEBROWSER_BOOK_HEAD, NEUTRINO_ICON_MOVIEPLAYER); pBookItemMenu->addItem(GenericMenuSeparator); - pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, movie_info->bookmarks.user[li].name, pBookNameInput)); + pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, bookmark_user_name.c_str(), pBookNameInput)); pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_POSITION, true, pBookPosIntInput->getValue(), pBookPosIntInput)); pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE, true, pBookTypeIntInput->getValue(), pBookTypeIntInput)); - bookmarkMenu.addItem(new CMenuDForwarder(movie_info->bookmarks.user[li].name.c_str(), true, pBookPosIntInput->getValue(), pBookItemMenu)); + bookmarkMenu.addItem(new CMenuDForwarder(bookmark_user_name.c_str(), true, pBookPosIntInput->getValue(), pBookItemMenu)); } /********************************************************************/ diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index dc260af8d..a1848ac6c 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -173,6 +173,15 @@ const CMenuOptionChooser::keyval END_OF_RECORDING[END_OF_RECORDING_COUNT] = {1, LOCALE_RECORDINGMENU_END_OF_RECORDING_EPG} }; +//NI +const CMenuOptionChooser::keyval timer_followscreenings_options[] = +{ + {0, LOCALE_OPTIONS_OFF}, + {1, LOCALE_OPTIONS_ON}, + {2, LOCALE_OPTIONS_ALWAYS} +}; +size_t timer_followscreenings_options_count = sizeof(timer_followscreenings_options)/sizeof(CMenuOptionChooser::keyval); + int CRecordSetup::showRecordSetup() { CMenuForwarder * mf; @@ -266,11 +275,6 @@ int CRecordSetup::showRecordSetup() cover->setHint("", LOCALE_MENU_HINT_RECORD_AUTO_COVER); recordingSettings->addItem(cover); - //NI configure timer events in followcreening - CMenuOptionChooser* tevents = new CMenuOptionChooser(LOCALE_RECORDINGMENU_TEVENTS, &g_settings.recording_tevents, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); - tevents->setHint("", LOCALE_MENU_HINT_RECORD_TEVENTS); - recordingSettings->addItem(tevents); - recordingSettings->addItem(GenericMenuSeparatorLine); if (!g_settings.easymenu) { @@ -350,6 +354,13 @@ void CRecordSetup::showRecordTimerSetup(CMenuWidget *menu_timersettings) ch->setHint("", LOCALE_MENU_HINT_RECORD_ZAP_PRE_TIME); ch->setNumberFormat(nf); menu_timersettings->addItem(ch); + + menu_timersettings->addItem(GenericMenuSeparatorLine); + + //allow followscreenings + CMenuOptionChooser* followscreenings = new CMenuOptionChooser(LOCALE_TIMERSETTINGS_FOLLOWSCREENINGS, &g_settings.timer_followscreenings, timer_followscreenings_options, timer_followscreenings_options_count, true); //NI + followscreenings->setHint("", LOCALE_MENU_HINT_TIMER_FOLLOWSCREENINGS); + menu_timersettings->addItem(followscreenings); } diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 5f1a9af93..80747e4d1 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1419,6 +1419,8 @@ void CTimerList::paint() CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_TIMERLIST_NAME)); paintHead(); + frameBuffer->paintBoxRel(x, y + theight, width, height - theight - footerHeight, COL_MENUCONTENT_PLUS_0); //NI + paintFoot(); //NI for (unsigned int count=0; countpaintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_SMALL); } - paintFoot(); + //NI paintFoot(); visible = true; } diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 703b3c542..ca11abf0e 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1446,7 +1446,7 @@ void CMenuWidget::paintHint(int pos) if (details_line) details_line->hide(); /* clear info box */ - if ((info_box) && (pos < 0)) + if ((info_box) && ((pos < 0) || savescreen)) savescreen ? info_box->hide() : info_box->kill(); if (info_box) hint_painted = info_box->isPainted(); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 427d14546..52bf7b013 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -549,6 +549,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.timer_remotebox_ip.push_back(timer_rb); } } + g_settings.timer_followscreenings = configfile.getInt32( "timer_followscreenings", 1 ); g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true ); g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false ); @@ -741,9 +742,8 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.recording_epg_for_filename = configfile.getBool("recording_epg_for_filename" , true); g_settings.recording_epg_for_end = configfile.getBool("recording_epg_for_end" , true); g_settings.recording_save_in_channeldir = configfile.getBool("recording_save_in_channeldir" , false); - g_settings.recording_slow_warning = configfile.getBool("recording_slow_warning" , false); //NI - g_settings.recording_fill_warning = configfile.getInt32("recording_fill_warning", 95); //NI - g_settings.recording_tevents = configfile.getBool("recording_tevents", false); //NI + g_settings.recording_slow_warning = configfile.getBool("recording_slow_warning" , false); //NI + g_settings.recording_fill_warning = configfile.getInt32("recording_fill_warning", 95); //NI g_settings.recording_startstop_msg = configfile.getBool("recording_startstop_msg" , true); g_settings.recording_already_found_check = configfile.getBool("recording_already_found_check", false); @@ -1061,6 +1061,7 @@ void CNeutrinoApp::upgradeSetup(const char * fname) configfile.setString("usermenu_tv_yellow", g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items); } } + //NI if (g_settings.version_pseudo < "20160623110000") { if (g_settings.screen_xres == 112) @@ -1069,11 +1070,21 @@ void CNeutrinoApp::upgradeSetup(const char * fname) if (g_settings.screen_yres == 112) g_settings.screen_yres = 105; } + //NI if (g_settings.version_pseudo < "20160804110000") { if (g_settings.tmdb_api_key == "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") g_settings.tmdb_api_key = "7270f1b571c4ecbb5b204ddb7f8939b1"; } + //NI + if (g_settings.version_pseudo < "20161411235900") + { + //convert and remove obsolete recording_tevents key + bool recording_tevents = configfile.getBool("recording_tevents", false); + if (recording_tevents) + g_settings.timer_followscreenings = 2 /*always*/; + configfile.deleteKey("recording_tevents"); + } g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO; configfile.setString("version_pseudo", g_settings.version_pseudo); @@ -1215,6 +1226,7 @@ void CNeutrinoApp::saveSetup(const char * fname) timer_remotebox_itemcount++; } configfile.setInt32 ( "timer_remotebox_ip_count", g_settings.timer_remotebox_ip.size()); + configfile.setInt32 ("timer_followscreenings", g_settings.timer_followscreenings); configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display ); configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc ); @@ -1356,7 +1368,6 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool ("recording_save_in_channeldir" , g_settings.recording_save_in_channeldir ); configfile.setBool ("recording_slow_warning" , g_settings.recording_slow_warning ); configfile.setInt32 ("recording_fill_warning" , g_settings.recording_fill_warning ); //NI - configfile.setBool ("recording_tevents" , g_settings.recording_tevents ); //NI configfile.setBool ("recording_startstop_msg" , g_settings.recording_startstop_msg ); configfile.setBool ("recording_already_found_check" , g_settings.recording_already_found_check ); diff --git a/src/nhttpd/yhttpd_mods/Makefile.am b/src/nhttpd/yhttpd_mods/Makefile.am index d10b3f5b2..c3a3791e9 100644 --- a/src/nhttpd/yhttpd_mods/Makefile.am +++ b/src/nhttpd/yhttpd_mods/Makefile.am @@ -1,4 +1,5 @@ AM_CPPFLAGS = \ + @HWLIB_CFLAGS@ \ -I$(top_builddir) \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src/zapit/include \ diff --git a/src/system/locals.h b/src/system/locals.h index 75d5234fa..19483ecf8 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1471,7 +1471,6 @@ typedef enum LOCALE_MENU_HINT_RECORD_SLOW_WARN, LOCALE_MENU_HINT_RECORD_STARTSTOP_MSG, LOCALE_MENU_HINT_RECORD_TDIR, - LOCALE_MENU_HINT_RECORD_TEVENTS, LOCALE_MENU_HINT_RECORD_TIME, LOCALE_MENU_HINT_RECORD_TIME_TS, LOCALE_MENU_HINT_RECORD_TIMEAFTER, @@ -1615,6 +1614,7 @@ typedef enum LOCALE_MENU_HINT_SW_UPDATE, LOCALE_MENU_HINT_THEME, LOCALE_MENU_HINT_TIMEOUTS, + LOCALE_MENU_HINT_TIMER_FOLLOWSCREENINGS, LOCALE_MENU_HINT_TIMERS, LOCALE_MENU_HINT_TIMEZONE, LOCALE_MENU_HINT_TMDB_API_KEY, @@ -2150,6 +2150,7 @@ typedef enum LOCALE_OPKG_UPDATE_READING_LISTS, LOCALE_OPKG_UPGRADE, LOCALE_OPKG_WARNING_3RDPARTY_PACKAGES, + LOCALE_OPTIONS_ALWAYS, LOCALE_OPTIONS_DEFAULT, LOCALE_OPTIONS_FB, LOCALE_OPTIONS_HINT_DEFAULT, @@ -2340,7 +2341,6 @@ typedef enum LOCALE_RECORDINGMENU_SERVER_MAC, LOCALE_RECORDINGMENU_SETUPNOW, LOCALE_RECORDINGMENU_SLOW_WARN, - LOCALE_RECORDINGMENU_TEVENTS, LOCALE_RECORDINGMENU_TIMESHIFT, LOCALE_RECORDINGMENU_TSDIR, LOCALE_RECORDINGMENU_VCR, @@ -2642,6 +2642,7 @@ typedef enum LOCALE_TIMERLIST_WEEKDAYS, LOCALE_TIMERLIST_WEEKDAYS_HINT_1, LOCALE_TIMERLIST_WEEKDAYS_HINT_2, + LOCALE_TIMERSETTINGS_FOLLOWSCREENINGS, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER_HINT_1, LOCALE_TIMERSETTINGS_RECORD_SAFETY_TIME_AFTER_HINT_2, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index f7ac20aa2..5bfce40fa 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1471,7 +1471,6 @@ const char * locale_real_names[] = "menu.hint_record_slow_warn", "menu.hint_record_startstop_msg", "menu.hint_record_tdir", - "menu.hint_record_tevents", "menu.hint_record_time", "menu.hint_record_time_ts", "menu.hint_record_timeafter", @@ -1615,6 +1614,7 @@ const char * locale_real_names[] = "menu.hint_sw_update", "menu.hint_theme", "menu.hint_timeouts", + "menu.hint_timer_followscreenings", "menu.hint_timers", "menu.hint_timezone", "menu.hint_tmdb_api_key", @@ -2150,6 +2150,7 @@ const char * locale_real_names[] = "opkg.update.reading_lists", "opkg.upgrade", "opkg.warning_3rdparty_packages", + "options.always", "options.default", "options.fb", "options.hint_default", @@ -2340,7 +2341,6 @@ const char * locale_real_names[] = "recordingmenu.server_mac", "recordingmenu.setupnow", "recordingmenu.slow_warn", - "recordingmenu.tevents", "recordingmenu.timeshift", "recordingmenu.tsdir", "recordingmenu.vcr", @@ -2642,6 +2642,7 @@ const char * locale_real_names[] = "timerlist.weekdays", "timerlist.weekdays.hint_1", "timerlist.weekdays.hint_2", + "timersettings.followscreenings", "timersettings.record_safety_time_after", "timersettings.record_safety_time_after.hint_1", "timersettings.record_safety_time_after.hint_2", diff --git a/src/system/settings.h b/src/system/settings.h index ba0f8b3ec..166c72081 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -470,10 +470,10 @@ struct SNeutrinoSettings int recording_zap_on_announce; int recording_slow_warning; int recording_fill_warning; //NI - int recording_tevents; //NI int recording_startstop_msg; int shutdown_timer_record_type; std::vector timer_remotebox_ip; + int timer_followscreenings; std::string recording_filename_template; int recording_already_found_check; diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 6878137f5..3f59b1de3 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -427,6 +427,38 @@ int CTimerManager::rescheduleEvent(int peventID, time_t announceTime, time_t ala pthread_mutex_unlock(&tm_eventsMutex); return res; } + +int CTimerManager::adjustEvent(int peventID, time_t announceTime, time_t alarmTime, time_t stopTime) +{ + int res = 0; + pthread_mutex_lock(&tm_eventsMutex); + + if(events.find(peventID)!=events.end()) + { + CTimerEvent *event = events[peventID]; + printf("before: EventID: %d - State %d\n",peventID,(int) event->eventState); + time_t now = time(NULL); + if(event->announceTime > 0) + event->announceTime = announceTime; + if (event->announceTime > now) + event->eventState = CTimerd::TIMERSTATE_SCHEDULED; + if(event->alarmTime > 0) + event->alarmTime = alarmTime; + if ((event->alarmTime > now) && (event->announceTime < now)) + event->eventState = CTimerd::TIMERSTATE_PREANNOUNCE; + if(event->stopTime > 0) + event->stopTime = stopTime; + if ((event->stopTime > now) && (event->alarmTime < now)) + event->eventState = CTimerd::TIMERSTATE_ISRUNNING; + m_saveEvents=true; + res = peventID; + printf("after: EventID: %d - State %d\n",peventID,(int) event->eventState); + } + else + res = 0; + pthread_mutex_unlock(&tm_eventsMutex); + return res; +} // --------------------------------------------------------------------------------- void CTimerManager::loadEventsFromConfig() { @@ -1222,6 +1254,8 @@ void CTimerEvent_Record::announceEvent() //------------------------------------------------------------ void CTimerEvent_Record::stopEvent() { + if (adjustToCurrentEPG()) + return; CTimerd::RecordingStopInfo stopinfo; // Set EPG-ID if not set stopinfo.eventID = eventID; @@ -1318,45 +1352,41 @@ bool CTimerEvent_Record::adjustToCurrentEPG() CChannelEventList evtlist; CEitManager::getInstance()->getEventsServiceKey(eventInfo.channel_id, evtlist); - time_t now = time(NULL); - time_t compare; - int pre, post; CTimerManager::getInstance()->getRecordingSafety(pre, post); - CChannelEventList::iterator first = evtlist.end(); - for (CChannelEventList::iterator e = evtlist.begin(); e != evtlist.end(); ++e) - { - compare = e->startTime; - if (!pre) - compare += e->duration; + time_t _announceTime = announceTime; + time_t _alarmTime = alarmTime; + time_t _stopTime = stopTime; - if (compare <= now) - continue; - if (first == evtlist.end() || first->startTime > e->startTime) - first = e; - if (alarmTime <= e->startTime && e->startTime + (int)e->duration <= stopTime) - return false; + if (recordingSafety) { + _alarmTime += pre; + _stopTime -= post; + } + + // we check for a time in the middle of the recording without considering pre and post + time_t check_time=_alarmTime/2 + _stopTime/2; + for ( CChannelEventList::iterator e= evtlist.begin(); e != evtlist.end(); ++e ) + { + if ( e->startTime <= check_time && (e->startTime + (int)e->duration) >= check_time) + { + _announceTime = e->startTime - (alarmTime - announceTime); + _alarmTime = e->startTime; + _stopTime = e->startTime + e->duration; + break; + } } - if (first == evtlist.end()) - return false; - time_t _announceTime = first->startTime - (alarmTime - announceTime); - time_t _alarmTime = first->startTime; - time_t _stopTime = first->startTime + first->duration; if (recordingSafety) { _alarmTime -= pre; _stopTime += post; } - CTimerEvent_Record *event= new CTimerEvent_Record(_announceTime, _alarmTime, _stopTime, - eventInfo.channel_id, eventInfo.epgID, first->startTime, eventInfo.apids, - CTimerd::TIMERREPEAT_ONCE, 1, recordingDir, recordingSafety, autoAdjustToEPG, - eventInfo.channel_ci); //NI - CTimerManager::getInstance()->addEvent(event,false); - setState(CTimerd::TIMERSTATE_HASFINISHED); + if ((_alarmTime != alarmTime) || (_announceTime != announceTime) || (_stopTime != stopTime)) + if (CTimerManager::getInstance()->adjustEvent(eventID, _announceTime, _alarmTime, _stopTime)) + return true; - return true; + return false; } //============================================================= // Zapto Event diff --git a/src/timerd/timermanager.h b/src/timerd/timermanager.h index fbae3f2d0..ac42ad317 100644 --- a/src/timerd/timermanager.h +++ b/src/timerd/timermanager.h @@ -250,6 +250,7 @@ public: int modifyEvent(int eventID, time_t announceTime, time_t alarmTime, time_t stopTime, uint32_t repeatcount, CTimerd::CTimerEventRepeat evrepeat, CTimerd::responseGetTimer& data); int modifyEvent(int eventID, unsigned char apids); int rescheduleEvent(int eventID, time_t announceTime, time_t alarmTime, time_t stopTime); + int adjustEvent(int eventID, time_t announceTime, time_t alarmTime, time_t stopTime); void saveEventsToConfig(); void loadEventsFromConfig(); bool shutdown(); diff --git a/version_pseudo.h b/version_pseudo.h index e0defae92..24beacfde 100644 --- a/version_pseudo.h +++ b/version_pseudo.h @@ -1 +1 @@ -#define NEUTRINO_VERSION_PSEUDO "20160804110000" +#define NEUTRINO_VERSION_PSEUDO "20161411235900"