Project "Tuxbox-GIT: apps": The branch, master has been updated via efb05c87a727c9ba3d53ffd1e9aeb3cb71b74cf5 (commit) via a47208be43dbba6cb7dfc94229c86c8ca6aa9584 (commit) via 427c91b398ffd7fe5ed268ab3f63c09946622a0f (commit) via 861d9114680c820761a3fe8986ce9e3d495e6615 (commit) via ce57f83f261f436548ed20ab09e4d2a51534cc80 (commit) via 5d2da2ed08720ab71537644086d9cd3827f592a3 (commit) via 22578157d28e5755ccad8d9cbcd911beec9b93ff (commit) via fe124b86672e1943aaefc5908298edfbd9fb7182 (commit) via 8390f8ddf1d47ae2e8c198c9577e3d0ea1bc8ad6 (commit) via 3ade27b5fec232363be1a9c3fe132f6e0322e4ba (commit) via 9b97b0409aa16b0107ba3927172a531f2711c120 (commit) via f14523f36cc3a6e8a6e8763077052eaf15071726 (commit) from c1cf01815f4f773d3ccedc83cc0f80fae53cbc93 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit efb05c87a727c9ba3d53ffd1e9aeb3cb71b74cf5 Author: Christian Schuett <gaucho...@hotmail.com> Date: Fri Mar 13 22:34:59 2015 +0100 Neutrino movieinfo: always show an empty line after info1 and info2 Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/movieinfo.cpp b/tuxbox/neutrino/src/gui/movieinfo.cpp index f004d7a..c7c20b7 100644 --- a/tuxbox/neutrino/src/gui/movieinfo.cpp +++ b/tuxbox/neutrino/src/gui/movieinfo.cpp @@ -502,6 +502,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO& movie_info) print_buffer += "\n"; print_buffer += movie_info.epgInfo2; } + print_buffer += "\n"; if( !movie_info.productionCountry.empty() || movie_info.productionDate != 0) { @@ -514,14 +515,14 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO& movie_info) if(!movie_info.serieName.empty()) { - print_buffer += "\n\n"; + print_buffer += "\n"; print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_SERIE); print_buffer += ": "; print_buffer += movie_info.serieName; } if(!movie_info.epgChannel.empty()) { - print_buffer += "\n\n"; + print_buffer += "\n"; print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_CHANNEL); print_buffer += ": "; print_buffer += movie_info.epgChannel; commit a47208be43dbba6cb7dfc94229c86c8ca6aa9584 Author: Christian Schuett <gaucho...@hotmail.com> Date: Fri Mar 13 20:14:09 2015 +0100 Neutrino: use EPG title as series name if record timer is repeat timer Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/daemons/timerd/timermanager.cpp b/tuxbox/neutrino/daemons/timerd/timermanager.cpp index 24a19e6..2d07185 100644 --- a/tuxbox/neutrino/daemons/timerd/timermanager.cpp +++ b/tuxbox/neutrino/daemons/timerd/timermanager.cpp @@ -1176,6 +1176,7 @@ void CTimerEvent_Record::fireEvent() Refresh(); CTimerd::RecordingInfo ri=eventInfo; ri.eventID=eventID; + ri.eventRepeat=eventRepeat; strcpy(ri.recordingDir, recordingDir.substr(0,sizeof(ri.recordingDir)-1).c_str()); strcpy(ri.epgTitle, epgTitle.substr(0,sizeof(ri.epgTitle)-1).c_str()); CTimerManager::getInstance()->getEventServer()->sendEvent(CTimerdClient::EVT_RECORD_START, @@ -1190,6 +1191,7 @@ void CTimerEvent_Record::announceEvent() Refresh(); CTimerd::RecordingInfo ri=eventInfo; ri.eventID=eventID; + ri.eventRepeat=eventRepeat; strcpy(ri.recordingDir, recordingDir.substr(0,sizeof(ri.recordingDir)-1).c_str()); strcpy(ri.epgTitle, epgTitle.substr(0,sizeof(ri.epgTitle)-1).c_str()); CTimerManager::getInstance()->getEventServer()->sendEvent(CTimerdClient::EVT_ANNOUNCE_RECORD, diff --git a/tuxbox/neutrino/lib/timerdclient/timerdtypes.h b/tuxbox/neutrino/lib/timerdclient/timerdtypes.h index 05cce10..a09ecaa 100644 --- a/tuxbox/neutrino/lib/timerdclient/timerdtypes.h +++ b/tuxbox/neutrino/lib/timerdclient/timerdtypes.h @@ -127,8 +127,8 @@ class CTimerd recordingSafety = e.recordingSafety; return *this; } - unsigned char apids; int eventID; + CTimerEventRepeat eventRepeat; char recordingDir[RECORD_DIR_MAXLEN]; char epgTitle[EPG_TITLE_MAXLEN]; }; diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp index cfe01ac..98a86b9 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp +++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp @@ -132,7 +132,7 @@ bool CVCRControl::Record(const CTimerd::RecordingInfo * const eventinfo) { int mode = g_Zapit->isChannelTVChannel(eventinfo->channel_id) ? NeutrinoMessages::mode_tv : NeutrinoMessages::mode_radio; - return Device->Record(eventinfo->channel_id, mode, eventinfo->epgID, eventinfo->epgTitle, eventinfo->apids, eventinfo->epg_starttime); + return Device->Record(eventinfo->channel_id, mode, eventinfo->epgID, eventinfo->epgTitle, eventinfo->apids, eventinfo->epg_starttime, eventinfo->eventRepeat); } //------------------------------------------------------------------------- @@ -261,7 +261,8 @@ bool CVCRControl::CVCRDevice::Stop() //------------------------------------------------------------------------- bool CVCRControl::CVCRDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, - const std::string& /*epgTitle*/, unsigned char apids, const time_t /*epg_time*/) + const std::string& /*epgTitle*/, unsigned char apids, const time_t /*epg_time*/, + const CTimerd::CTimerEventRepeat /*eventRepeat*/) { printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS @@ -442,6 +443,7 @@ void CVCRControl::CFileAndServerDevice::CutBackNeutrino(const t_channel_id chann std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channel_id channel_id, const event_id_t epgid, const time_t epg_time, const std::string& epgTitle, unsigned char apids, + const CTimerd::CTimerEventRepeat eventRepeat, const bool save_vtxt_pid, const bool save_sub_pids) { std::string extMessage; @@ -524,6 +526,9 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe movieInfo.audioPids.push_back(audio_pids); } + if (eventRepeat != CTimerd::TIMERREPEAT_ONCE) + movieInfo.serieName = movieInfo.epgTitle; + if (save_vtxt_pid) movieInfo.epgVTXPID = si.vtxtpid; @@ -544,13 +549,15 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const t_channe return extMessage; } -std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, unsigned char apids) +std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRCommand command, const t_channel_id channel_id, + const event_id_t epgid, const std::string& epgTitle, unsigned char apids, + const CTimerd::CTimerEventRepeat eventRepeat) { char tmp[40]; std::string apids_selected; const char * extCommand; // std::string extAudioPID= "error"; - std::string info1, info2; + std::string title, info1, info2; std::string extMessage = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<neutrino commandversion=\"1\">\n\t<record command=\""; switch(command) { @@ -604,19 +611,19 @@ std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRComman extMessage += "</channelname>\n\t\t<epgtitle>"; // CSectionsdClient::responseGetCurrentNextInfoChannelID current_next; - tmpstring = (epgTitle.empty()) ? "not available" : Latin1_to_UTF8(epgTitle); + title = (epgTitle.empty()) ? "not available" : Latin1_to_UTF8(epgTitle); if (epgid != 0) { CShortEPGData epgdata; if (g_Sectionsd->getEPGidShort(epgid, &epgdata)) { #warning fixme sectionsd should deliver data in UTF-8 format - tmpstring = Latin1_to_UTF8(epgdata.title); + title = Latin1_to_UTF8(epgdata.title); info1 = Latin1_to_UTF8(epgdata.info1); info2 = Latin1_to_UTF8(epgdata.info2); } } - extMessage += ZapitTools::UTF8_to_UTF8XML(tmpstring.c_str()); + extMessage += ZapitTools::UTF8_to_UTF8XML(title.c_str()); extMessage += "</epgtitle>\n\t\t<id>"; @@ -676,6 +683,12 @@ std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRComman if (!tmpstring.empty()) tmpstring += "\t\t</subpids>\n"; extMessage += tmpstring; + if (eventRepeat != CTimerd::TIMERREPEAT_ONCE) + { + extMessage += "\t\t<seriename>"; + extMessage += ZapitTools::UTF8_to_UTF8XML(title.c_str()); + extMessage += "</seriename>\n"; + } extMessage += "\t</record>\n" "</neutrino>\n"; @@ -709,7 +722,9 @@ bool CVCRControl::CFileDevice::Stop() return return_value; } -bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string &epgTitle, unsigned char apids,const time_t epg_time) +bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, + const std::string &epgTitle, unsigned char apids, const time_t epg_time, + const CTimerd::CTimerEventRepeat eventRepeat) { printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS @@ -877,7 +892,7 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c } else { error_msg = ::start_recording(filename, - getMovieInfoString(channel_id, epgid, epg_time, epgTitle, apids, save_vtxt_pid, save_sub_pids).c_str(), + getMovieInfoString(channel_id, epgid, epg_time, epgTitle, apids, eventRepeat, save_vtxt_pid, save_sub_pids).c_str(), mode, Use_O_Sync, Use_Fdatasync, @@ -1067,7 +1082,8 @@ bool CVCRControl::CServerDevice::Stop() //------------------------------------------------------------------------- bool CVCRControl::CServerDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, - const std::string &epgTitle, unsigned char apids, const time_t /*epg_time*/) + const std::string &epgTitle, unsigned char apids, const time_t /*epg_time*/, + const CTimerd::CTimerEventRepeat eventRepeat) { printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS @@ -1101,7 +1117,7 @@ bool CVCRControl::CServerDevice::Record(const t_channel_id channel_id, int mode, } #endif - if(!sendCommand(CMD_VCR_RECORD, channel_id, epgid, epgTitle, apids)) + if(!sendCommand(CMD_VCR_RECORD, channel_id, epgid, epgTitle, apids, eventRepeat)) { RestoreNeutrino(); @@ -1121,7 +1137,9 @@ void CVCRControl::CServerDevice::serverDisconnect() } //------------------------------------------------------------------------- -bool CVCRControl::CServerDevice::sendCommand(CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, unsigned char apids) +bool CVCRControl::CServerDevice::sendCommand(CVCRCommand command, const t_channel_id channel_id, + const event_id_t epgid, const std::string& epgTitle, unsigned char apids, + const CTimerd::CTimerEventRepeat eventRepeat) { printf("Send command: %d channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS @@ -1132,7 +1150,7 @@ bool CVCRControl::CServerDevice::sendCommand(CVCRCommand command, const t_channe epgid); if(serverConnect()) { - std::string extMessage = getCommandString(command, channel_id, epgid, epgTitle, apids); + std::string extMessage = getCommandString(command, channel_id, epgid, epgTitle, apids, eventRepeat); printf("sending to vcr-client:\n\n%s\n", extMessage.c_str()); write(sock_fd, extMessage.c_str() , extMessage.length() ); diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.h b/tuxbox/neutrino/src/driver/vcrcontrol.h index 3e50c01..6d457a0 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.h +++ b/tuxbox/neutrino/src/driver/vcrcontrol.h @@ -70,7 +70,8 @@ class CVCRControl CVCRStates deviceState; virtual bool Stop() = 0; virtual bool Record(const t_channel_id channel_id = 0, int mode = NeutrinoMessages::mode_tv, const event_id_t epgid = 0, - const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0) = 0; + const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0, + const CTimerd::CTimerEventRepeat eventRepeat = CTimerd::TIMERREPEAT_ONCE) = 0; virtual bool Pause() = 0; virtual bool Resume() = 0; virtual bool IsAvailable() = 0; @@ -96,7 +97,8 @@ class CVCRControl }; virtual bool Stop(); virtual bool Record(const t_channel_id channel_id = 0, int mode = NeutrinoMessages::mode_tv, const event_id_t epgid = 0, - const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0); + const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0, + const CTimerd::CTimerEventRepeat eventRepeat = CTimerd::TIMERREPEAT_ONCE); virtual bool Pause(); virtual bool Resume(); virtual bool IsAvailable() { return true; }; @@ -109,8 +111,11 @@ class CVCRControl protected: void RestoreNeutrino(void); void CutBackNeutrino(const t_channel_id channel_id, const int mode); - std::string getCommandString(const CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, unsigned char apids); - std::string getMovieInfoString(const t_channel_id channel_id, const event_id_t epgid, const time_t epg_time, const std::string& epgTitle, unsigned char apids, const bool save_vtxt_pid, const bool save_sub_pids); + std::string getCommandString(const CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, + const std::string& epgTitle, unsigned char apids, const CTimerd::CTimerEventRepeat eventRepeat); + std::string getMovieInfoString(const t_channel_id channel_id, const event_id_t epgid, const time_t epg_time, + const std::string& epgTitle, unsigned char apids, const CTimerd::CTimerEventRepeat eventRepeat, + const bool save_vtxt_pid, const bool save_sub_pids); public: bool StopPlayBack; @@ -153,7 +158,8 @@ class CVCRControl virtual bool Stop(); virtual bool Record(const t_channel_id channel_id = 0, int mode = NeutrinoMessages::mode_tv, const event_id_t epgid = 0, - const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0); + const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0, + const CTimerd::CTimerEventRepeat eventRepeat = CTimerd::TIMERREPEAT_ONCE); CFileDevice(const bool stopplayback, const int stopsectionsd, const char * const directory, const unsigned int splitsize, const bool use_o_sync, const bool use_fdatasync, const bool stream_vtxt_pid, const bool stream_subtitle_pid, const unsigned int ringbuffers, const bool gen_psi, bool createTemplateDirectories) @@ -182,7 +188,9 @@ class CVCRControl bool serverConnect(); void serverDisconnect(); - bool sendCommand(CVCRCommand command, const t_channel_id channel_id = 0, const event_id_t epgid = 0, const std::string& epgTitle="", unsigned char apids = 0); + bool sendCommand(CVCRCommand command, const t_channel_id channel_id = 0, const event_id_t epgid = 0, + const std::string& epgTitle = "", unsigned char apids = 0, + const CTimerd::CTimerEventRepeat eventRepeat = CTimerd::TIMERREPEAT_ONCE); public: std::string ServerAddress; @@ -195,7 +203,8 @@ class CVCRControl virtual bool Stop(); virtual bool Record(const t_channel_id channel_id = 0, int mode = NeutrinoMessages::mode_tv, const event_id_t epgid = 0, - const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0); + const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0, + const CTimerd::CTimerEventRepeat eventRepeat = CTimerd::TIMERREPEAT_ONCE); CServerDevice(const bool stopplayback, const int stopsectionsd, const char * const serveraddress, const unsigned int serverport) { diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index bb55e0d..73f73e2 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -1734,6 +1734,7 @@ bool CNeutrinoApp::doGuiRecord(char * preselectedDir, bool addTimer, char * file perror(NEUTRINO_RECORDING_START_SCRIPT " failed"); eventinfo.channel_id = g_Zapit->getCurrentServiceID(); + eventinfo.eventRepeat = CTimerd::TIMERREPEAT_ONCE; CEPGData epgData; if (filename == NULL && g_Sectionsd->getActualEPGServiceKey(g_RemoteControl->current_channel_id, &epgData)) { commit 427c91b398ffd7fe5ed268ab3f63c09946622a0f Author: Christian Schuett <gaucho...@hotmail.com> Date: Mon Mar 9 20:41:06 2015 +0100 timerd: remove unnecessary workarounds when saving events to file Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/daemons/timerd/timermanager.cpp b/tuxbox/neutrino/daemons/timerd/timermanager.cpp index f309b06..24a19e6 100644 --- a/tuxbox/neutrino/daemons/timerd/timermanager.cpp +++ b/tuxbox/neutrino/daemons/timerd/timermanager.cpp @@ -457,9 +457,8 @@ void CTimerManager::loadEventsFromConfig() } else { - std::vector<int> savedIDs; - savedIDs = config.getInt32Vector ("IDS"); - dprintf("%d timer(s) in config\n",savedIDs.size()); + std::vector<int> savedIDs = config.getInt32Vector("IDS"); + dprintf("%d timer(s) in config\n", savedIDs.size()); for(unsigned int i=0; i < savedIDs.size(); i++) { std::stringstream ostr; @@ -1018,18 +1017,11 @@ void CTimerEvent::printEvent(void) void CTimerEvent::saveToConfig(CConfigFile *config) { dprintf("CTimerEvent::saveToConfig\n"); - std::vector<int> allIDs; - if (!(config->getString("IDS").empty())) - { - // sonst bekommen wir den bloeden 0er - allIDs=config->getInt32Vector("IDS"); - } + std::vector<int> allIDs = config->getInt32Vector("IDS"); allIDs.push_back(eventID); - dprintf("adding %d to IDS\n",eventID); - //SetInt-Vector haengt komischerweise nur an, deswegen erst loeschen - config->setString("IDS",""); - config->setInt32Vector ("IDS",allIDs); + dprintf("adding %d to IDS\n", eventID); + config->setInt32Vector("IDS", allIDs); std::stringstream ostr; ostr << eventID; commit 861d9114680c820761a3fe8986ce9e3d495e6615 Author: Christian Schuett <gaucho...@hotmail.com> Date: Mon Mar 9 19:28:51 2015 +0100 Neutrino bookmark manager: avoid saving deleted entries to bookmark file Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp index 18006c7..c4ff827 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp @@ -156,8 +156,6 @@ void CBookmarkManager::readBookmarkFile() { bookmarkstring[BOOKMARKSTRINGMODIFICATIONPOINT]++; } } - else - bookmarkfile.clear(); } //------------------------------------------------------------------------ @@ -167,6 +165,7 @@ void CBookmarkManager::writeBookmarkFile() { printf("CBookmarkManager: Writing bookmark file\n"); + bookmarkfile.clear(); for (std::vector<CBookmark>::const_iterator it = bookmarks.begin(); it != bookmarks.end(); ++it) { std::string tmp = bookmarkstring; commit ce57f83f261f436548ed20ab09e4d2a51534cc80 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Mar 7 22:48:22 2015 +0100 Neutrino bookmark manager: don't write bookmark file multiple times ... ... when leaving movieplayer Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp index bab3f20..18006c7 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp @@ -183,6 +183,8 @@ void CBookmarkManager::writeBookmarkFile() { } bookmarkfile.setInt32("bookmarkcount", bookmarks.size()); bookmarkfile.saveConfig(BOOKMARKFILE); + + bookmarksmodified = false; } //------------------------------------------------------------------------ commit 5d2da2ed08720ab71537644086d9cd3827f592a3 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Mar 7 21:31:07 2015 +0100 Neutrino bookmark manager: only add bookmark if OK pressed Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp index 002a001..bab3f20 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.cpp +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.cpp @@ -82,11 +82,15 @@ inline int CBookmarkManager::createBookmark (const std::string & name, const std } int CBookmarkManager::createBookmark (const std::string & url, const std::string & time) { - char bookmarkname[26]=""; - CStringInputSMS bookmarkname_input(LOCALE_MOVIEPLAYER_BOOKMARKNAME, bookmarkname, 25, LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT1, LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT2, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_"); - bookmarkname_input.exec(NULL, ""); - // TODO: return -1 if no name was entered - return createBookmark(ZapitTools::Latin1_to_UTF8(bookmarkname), url, time); + char bookmarkname[26]=""; + CStringInputSMS bookmarkname_input(LOCALE_MOVIEPLAYER_BOOKMARKNAME, bookmarkname, 25, LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT1, LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT2, "abcdefghijklmnopqrstuvwxyz\xE4\xF6\xFC\xDF""0123456789-_", this); + bookmarkname_input.exec(NULL, ""); + if (bookmarkname_entered) + { + bookmarkname_entered = false; + return createBookmark(ZapitTools::Latin1_to_UTF8(bookmarkname), url, time); + } + return -1; } //------------------------------------------------------------------------ @@ -185,6 +189,7 @@ void CBookmarkManager::writeBookmarkFile() { CBookmarkManager::CBookmarkManager() : bookmarkfile ('\t') { + bookmarkname_entered = false; bookmarksmodified = false; readBookmarkFile(); } @@ -197,6 +202,14 @@ CBookmarkManager::~CBookmarkManager () { //------------------------------------------------------------------------ +bool CBookmarkManager::changeNotify(const neutrino_locale_t, void *) +{ + bookmarkname_entered = true; + return false; +} + +//------------------------------------------------------------------------ + int CBookmarkManager::getBookmarkCount(void) const { return bookmarks.size(); } diff --git a/tuxbox/neutrino/src/gui/bookmarkmanager.h b/tuxbox/neutrino/src/gui/bookmarkmanager.h index fcff725..df14691 100644 --- a/tuxbox/neutrino/src/gui/bookmarkmanager.h +++ b/tuxbox/neutrino/src/gui/bookmarkmanager.h @@ -63,7 +63,7 @@ class CBookmark //----------------------------------------- -class CBookmarkManager +class CBookmarkManager : public CChangeObserver { private: std::vector<CBookmark> bookmarks; @@ -85,6 +85,7 @@ class CBookmarkManager //int bookmarkCount; + bool bookmarkname_entered; bool bookmarksmodified; void readBookmarkFile(); void writeBookmarkFile(); @@ -103,6 +104,7 @@ class CBookmarkManager public: CBookmarkManager(); ~CBookmarkManager(); + bool changeNotify(const neutrino_locale_t, void *); int createBookmark(const std::string & name, const std::string & url, const std::string & time); int createBookmark(const std::string & url, const std::string & time); void removeBookmark(unsigned int index); commit 22578157d28e5755ccad8d9cbcd911beec9b93ff Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Mar 7 17:56:20 2015 +0100 Neutrino: reload plugins after changing language to respect localization Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/osdlang_setup.cpp b/tuxbox/neutrino/src/gui/osdlang_setup.cpp index bc30daf..1fdf049 100644 --- a/tuxbox/neutrino/src/gui/osdlang_setup.cpp +++ b/tuxbox/neutrino/src/gui/osdlang_setup.cpp @@ -74,6 +74,8 @@ int COsdLangSetup::exec(CMenuTarget* parent, const std::string & actionKey) const char * locale = actionKey.c_str(); strcpy(g_settings.language, locale); + g_PluginList->loadPlugins(); + int unicode_locale = g_Locale->loadLocale(locale); if(CNeutrinoApp::getInstance()->ChangeFonts(unicode_locale)) { commit fe124b86672e1943aaefc5908298edfbd9fb7182 Author: svenhoefer <svenhoe...@svenhoefer.com> Date: Sat Mar 7 17:44:19 2015 +0100 Neutrino plugins: allow localization in plugin.cfg Example: name=Default plugin name description=Default plugin desription name.deutsch=Deutscher Plugin-Name name.english=English plugin name Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/plugins.cpp b/tuxbox/neutrino/src/gui/plugins.cpp index 2b9f36d..8ba4163 100644 --- a/tuxbox/neutrino/src/gui/plugins.cpp +++ b/tuxbox/neutrino/src/gui/plugins.cpp @@ -195,14 +195,24 @@ bool CPlugins::parseCfg(plugin *plugin_data) { plugin_data->index = atoi(parm.c_str()); } - else if (cmd == "name") + else if (cmd == std::string("name.") + g_settings.language) { plugin_data->name = parm; } - else if (cmd == "desc") + else if (cmd == "name") + { + if (plugin_data->name.empty()) + plugin_data->name = parm; + } + else if (cmd == std::string("desc.") + g_settings.language) { plugin_data->description = parm; } + else if (cmd == "desc") + { + if (plugin_data->description.empty()) + plugin_data->description = parm; + } else if (cmd == "depend") { plugin_data->depend = parm; @@ -250,6 +260,9 @@ bool CPlugins::parseCfg(plugin *plugin_data) } + if (plugin_data->name.empty()) + plugin_data->name = plugin_data->filename; + inFile.close(); return !reject; } commit 8390f8ddf1d47ae2e8c198c9577e3d0ea1bc8ad6 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Feb 28 19:42:48 2015 +0100 Neutrino user menu: change scope of a variable to avoid a segfault * I have never seen that code crashing but it looks wrong, so let's change the scope of 'dummy' to make sure it can't crash * also (re-)move unused code Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/neutrino_menu.cpp b/tuxbox/neutrino/src/gui/neutrino_menu.cpp index 4d2fdef..78aa91a 100644 --- a/tuxbox/neutrino/src/gui/neutrino_menu.cpp +++ b/tuxbox/neutrino/src/gui/neutrino_menu.cpp @@ -298,7 +298,12 @@ void CNeutrinoApp::InitMenuSettings() //yellow (miscSettings) personalize->addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, new CMiscMenue(LOCALE_MAINMENU_SETTINGS), NULL, CRCInput::RC_yellow), &g_settings.personalize_misc); - + +#ifdef _EXPERIMENTAL_SETTINGS_ + //experimental settings + personalize->addItem(MENU_SETTINGS, new CMenuForwarder(LOCALE_EXPERIMENTALSETTINGS, true, NULL, new CExperimentalSettingsMenuHandler()), NULL, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); +#endif + //separator personalize->addSeparator(MENU_SETTINGS); @@ -392,6 +397,7 @@ bool CNeutrinoApp::showUserMenu(int button) int menu_items = 0; int menu_prev = -1; int cnt = 0; + int dummy = 0; // define classes CFavorites* tmpFavorites = NULL; @@ -439,7 +445,6 @@ bool CNeutrinoApp::showUserMenu(int button) // go through any postition number for(int pos = 0; pos < SNeutrinoSettings::ITEM_MAX ; pos++) { - int dummy; // now compare pos with the position of any item. Add this item if position is the same switch(g_settings.usermenu[button][pos]) { @@ -648,31 +653,7 @@ bool CNeutrinoApp::showUserMenu(int button) break; } } - - // Allow some tailoring for privat image bakers ;) - if (button == SNeutrinoSettings::BUTTON_RED) - { - } - else if( button == SNeutrinoSettings::BUTTON_GREEN) - { - } - else if( button == SNeutrinoSettings::BUTTON_YELLOW) - { - } - else if( button == SNeutrinoSettings::BUTTON_BLUE) - { -#ifdef _EXPERIMENTAL_SETTINGS_ - //Experimental Settings - if(menu_prev != -1) - menu->addItem(GenericMenuSeparatorLine); - menu_items ++; - menu_key++; - // FYI: there is a memory leak with 'new CExperimentalSettingsMenuHandler() - menu_item = new CMenuForwarder(LOCALE_EXPERIMENTALSETTINGS, true, NULL, new CExperimentalSettingsMenuHandler(), "-1", CRCInput::convertDigitToKey(menu_key)); - menu->addItem(menu_item, false); -#endif - } - + if(menu_items > 1 ) // show menu if there are more than 2 items only { menu->exec(NULL,""); @@ -682,9 +663,6 @@ bool CNeutrinoApp::showUserMenu(int button) menu_item->exec( NULL ); } // neither nor, we do nothing - // restore mute symbol - //AudioMute(current_muted, true); - // clear the heap delete menu; delete tmpFavorites; commit 3ade27b5fec232363be1a9c3fe132f6e0322e4ba Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Feb 28 18:17:47 2015 +0100 Neutrino movieplayer: simplify updateLcd() there is no need to consider current play state because updateLCD() is not called while paused Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp index 21d887f..74b17d0 100644 --- a/tuxbox/neutrino/src/gui/movieplayer.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer.cpp @@ -1344,28 +1344,13 @@ PlayStreamThread (void *mrl) //== updateLcd == //=============== -void updateLcd(const std::string & big, const std::string & small) +void updateLcd(const std::string & big, std::string small) { - static int l_playstate = -1; - std::string lcd_small = small; - CLCD::PLAYMODES playmode; - - if(l_playstate == g_playstate) return; - - switch(g_playstate) - { - case CMoviePlayerGui::PAUSE: - playmode = CLCD::PLAYMODE_PAUSE; - break; - default: - playmode = CLCD::PLAYMODE_PLAY; - break; - } - StrSearchReplace(lcd_small, "_", " "); - if (lcd_small.length() > 80) - lcd_small = lcd_small.substr(0, 80); - CLCD::getInstance()->setMoviePlaymode(playmode); - CLCD::getInstance()->setMovieInfo(big, lcd_small); + StrSearchReplace(small, "_", " "); + if (small.length() > 80) + small = small.substr(0, 80); + CLCD::getInstance()->setMoviePlaymode(CLCD::PLAYMODE_PLAY); + CLCD::getInstance()->setMovieInfo(big, small); } // GMO snip start ... @@ -3918,7 +3903,7 @@ void CMoviePlayerGui::PlayFile (int parental) { /* Moviebrowser movie end bookmark */ p_movie_info->bookmarks.end = pos_sec; - TRACE("[mp] New movie end pos: %d\r\n",p_movie_info->bookmarks.start); + TRACE("[mp] New movie end pos: %d\r\n",p_movie_info->bookmarks.end); cMovieInfo.saveMovieInfo(*p_movie_info);/* save immediately in xml file */ cSelectedMenuBookStart[5].selected = false;// clear for next bookmark menu } diff --git a/tuxbox/neutrino/src/gui/movieplayer2.cpp b/tuxbox/neutrino/src/gui/movieplayer2.cpp index 57e5e1d..c2565c3 100644 --- a/tuxbox/neutrino/src/gui/movieplayer2.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer2.cpp @@ -2477,29 +2477,13 @@ OutputThread(void *arg) //== updateLcd == //=============== -void updateLcd(const std::string &big, const std::string &small) +void updateLcd(const std::string &big, std::string small) { - static int l_playstate = -1; - std::string lcd_small = small; - CLCD::PLAYMODES playmode; - - if (l_playstate == g_playstate) - return; - - switch (g_playstate) - { - case CMoviePlayerGui::PAUSE: - playmode = CLCD::PLAYMODE_PAUSE; - break; - default: - playmode = CLCD::PLAYMODE_PLAY; - break; - } - StrSearchReplace(lcd_small, "_", " "); - if (lcd_small.length() > 80) - lcd_small = lcd_small.substr(0, 80); - CLCD::getInstance()->setMoviePlaymode(playmode); - CLCD::getInstance()->setMovieInfo(big, lcd_small); + StrSearchReplace(small, "_", " "); + if (small.length() > 80) + small = small.substr(0, 80); + CLCD::getInstance()->setMoviePlaymode(CLCD::PLAYMODE_PLAY); + CLCD::getInstance()->setMovieInfo(big, small); } //== seek to pos with sync to next proper TS packet == commit 9b97b0409aa16b0107ba3927172a531f2711c120 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Feb 28 17:53:28 2015 +0100 Neutrino moviebrowser: disable unused experimental stuff Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp index 330077f..7f9036d 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.cpp +++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp @@ -1432,11 +1432,13 @@ void CMovieBrowser::refreshFilterList(void) } sort(m_FilterLines.lineArray[0].begin() + 1, m_FilterLines.lineArray[0].end(), sortByAlpha); } +#ifdef MB_SEARCH_INFO2 else if(m_settings.filter.item == MB_INFO_INFO2) { string_item = "->Eingabe"; m_FilterLines.lineArray[0].push_back(string_item); } +#endif else if(m_settings.filter.item == MB_INFO_MAJOR_GENRE) { for(int i = 0; i < GENRE_ALL_COUNT; i++) @@ -2063,11 +2065,18 @@ bool CMovieBrowser::onButtonPressFilterList(neutrino_msg_t msg) int selected_line = m_pcFilter->getSelectedLine(); if(m_settings.filter.item == MB_INFO_MAX_NUMBER) { - if(selected_line == 0) m_settings.filter.item = MB_INFO_MAJOR_GENRE; - if(selected_line == 1) m_settings.filter.item = MB_INFO_INFO1; - if(selected_line == 4) m_settings.filter.item = MB_INFO_INFO2; - if(selected_line == 2) m_settings.filter.item = MB_INFO_FILEPATH; - if(selected_line == 3) m_settings.filter.item = MB_INFO_SERIE; + if(selected_line == 0) + m_settings.filter.item = MB_INFO_MAJOR_GENRE; + else if(selected_line == 1) + m_settings.filter.item = MB_INFO_INFO1; +#ifdef MB_SEARCH_INFO2 + else if(selected_line == 4) + m_settings.filter.item = MB_INFO_INFO2; +#endif + else if(selected_line == 2) + m_settings.filter.item = MB_INFO_FILEPATH; + else if(selected_line == 3) + m_settings.filter.item = MB_INFO_SERIE; refreshFilterList(); m_pcFilter->setSelectedLine(0); } @@ -2794,6 +2803,7 @@ void CMovieBrowser::updateFilterSelection(void) { m_settings.filter.optionString = m_FilterLines.lineArray[0][selected_line+1]; } +#ifdef MB_SEARCH_INFO2 else if(m_settings.filter.item == MB_INFO_INFO2) { std::string text; @@ -2803,6 +2813,7 @@ void CMovieBrowser::updateFilterSelection(void) refreshFilterList(); refreshTitle(); } +#endif else if(m_settings.filter.item == MB_INFO_MAJOR_GENRE) { m_settings.filter.optionString = m_FilterLines.lineArray[0][selected_line+1]; @@ -3355,10 +3366,12 @@ bool CMovieBrowser::isFiltered(MI_MOVIE_INFO& movie_info) if(strcmp(m_settings.filter.optionString.c_str(),movie_info.epgInfo1.c_str()) == 0) result = false; break; +#ifdef MB_SEARCH_INFO2 case MB_INFO_INFO2: if(movie_info.epgInfo2.find(m_settings.filter.optionString) != std::string::npos ) result = false; break; +#endif case MB_INFO_MAJOR_GENRE: if(m_settings.filter.optionVar == movie_info.genreMajor) result = false; commit f14523f36cc3a6e8a6e8763077052eaf15071726 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Feb 28 17:35:02 2015 +0100 Neutrino moviebrowser: remove incomplete and unused movemanager stuff Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp index 1eb1cf1..330077f 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.cpp +++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp @@ -50,10 +50,6 @@ // experimental stuff 8) //#define MB_SEARCH_INFO2 -//#define MOVEMANAGER 1 -#ifdef MOVEMANAGER -#include <gui/movemanager.h> -#endif // MOVEMANAGER #include <algorithm> @@ -1912,46 +1908,6 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) if(m_playstate == CMoviePlayerGui::STOPPED && m_movieSelectionHandler != NULL) showMenu(m_movieSelectionHandler); } -#ifdef MOVEMANAGER - else if (msg == CRCInput::RC_1) - { - std::string source; - static std::string dest = "/hdd/Filme"; - source = m_movieSelectionHandler->file.Name; - CDirChooser dir(&dest,"/mnt/","/hdd"); - dir.exec(NULL,""); - if(!dest.empty()) - { - dest += "/"; - dest += m_movieSelectionHandler->file.getFileName(); - CMoveManager::getInstance()->newMove(dest,source,MOVE_TYPE_COPY); - - if(m_movieInfo.convertTs2XmlName(&source) == true) - if(m_movieInfo.convertTs2XmlName(&dest) == true) - CMoveManager::getInstance()->newMove(dest,source,MOVE_TYPE_COPY); - } - refresh(); - } - else if (msg == CRCInput::RC_0) - { - std::string source; - std::string dest = "/hdd/Filme"; - source = m_movieSelectionHandler->file.Name; - CDirChooser dir(&dest,"/mnt/","/hdd"); - dir.exec(NULL,""); - if(!dest.empty()) - { - dest += "/"; - dest += m_movieSelectionHandler->file.getFileName(); - CMoveManager::getInstance()->newMove(dest,source,MOVE_STATE_MOVE); - - if(m_movieInfo.convertTs2XmlName(&source) == true) - if(m_movieInfo.convertTs2XmlName(&dest) == true) - CMoveManager::getInstance()->newMove(dest,source,MOVE_STATE_MOVE); - } - refresh(); - } -#endif //MOVEMANAGER else { //TRACE("[mb]->onButtonPressMainFrame none\r\n"); @@ -3247,10 +3203,6 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/) #ifdef ENABLE_GUI_MOUNT //mainMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_NFS_HEAD, true, NULL, nfs, NULL, CRCInput::RC_setup)); #endif -#ifdef MOVEMANAGER - mainMenu.addItem(GenericMenuSeparatorLine); - mainMenu.addItem( new CMenuForwarder("Kopierwerk", true, NULL, CMoveManager::getInstance())); -#endif // MOVEMANAGER mainMenu.addItem(GenericMenuSeparatorLine); mainMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_HELP_HEAD, true, NULL, movieHelp, NULL, CRCInput::RC_help)); mainMenu.exec(NULL, " "); ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/daemons/timerd/timermanager.cpp | 20 ++---- tuxbox/neutrino/lib/timerdclient/timerdtypes.h | 2 +- tuxbox/neutrino/src/driver/vcrcontrol.cpp | 44 ++++++++++---- tuxbox/neutrino/src/driver/vcrcontrol.h | 23 +++++-- tuxbox/neutrino/src/gui/bookmarkmanager.cpp | 28 +++++++-- tuxbox/neutrino/src/gui/bookmarkmanager.h | 4 +- tuxbox/neutrino/src/gui/moviebrowser.cpp | 71 ++++++----------------- tuxbox/neutrino/src/gui/movieinfo.cpp | 5 +- tuxbox/neutrino/src/gui/movieplayer.cpp | 29 ++------- tuxbox/neutrino/src/gui/movieplayer2.cpp | 28 ++------- tuxbox/neutrino/src/gui/neutrino_menu.cpp | 38 +++---------- tuxbox/neutrino/src/gui/osdlang_setup.cpp | 2 + tuxbox/neutrino/src/gui/plugins.cpp | 17 +++++- tuxbox/neutrino/src/neutrino.cpp | 1 + 14 files changed, 139 insertions(+), 173 deletions(-) -- Tuxbox-GIT: apps ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Tuxbox-cvs-commits mailing list Tuxbox-cvs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits