From: Felix Domke Date: Fri, 13 Feb 2009 13:47:32 +0000 (+0100) Subject: Merge branch 'master' of /home/tmbinc/enigma2-git into tmbinc/FixTimingBugs X-Git-Tag: 2.6.0~350^2~3 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/4510fa62a33b31fec442fd0d77eb682d93ebf7e6?hp=eccbf5ccedceaf21d4d2557e5ef12ef9a53930ca Merge branch 'master' of /home/tmbinc/enigma2-git into tmbinc/FixTimingBugs Conflicts: lib/python/Components/Converter/StringList.py --- diff --git a/RecordTimer.py b/RecordTimer.py index f8e0dbd7..aeff9d05 100644 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -192,8 +192,8 @@ class RecordTimerEntry(timer.TimerEntry, object): try: f = open(self.Filename + ".ts.meta", "w") f.write(rec_ref.toString() + "\n") - f.write(self.name + "\n") - f.write(self.description + "\n") + f.write(self.name.replace("\n", "") + "\n") + f.write(self.description.replace("\n", "") + "\n") f.write(str(self.begin) + "\n") f.write(' '.join(self.tags)) f.close() diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index e0291ec1..5df17931 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -961,14 +961,15 @@ void PutToDict(ePyObject &dict, const char*key, const char *value) eDebug("could not create PyObject for %s", key); } -void fillDictWithSatelliteData(ePyObject dict, const FRONTENDPARAMETERS &parm, eDVBFrontend *fe) +void fillDictWithSatelliteData(ePyObject dict, const FRONTENDPARAMETERS &parm, long freq_offset, int orb_pos, int polarization) { - long freq_offset=0; long tmp=0; - fe->getData(eDVBFrontend::FREQ_OFFSET, freq_offset); int frequency = parm_frequency + freq_offset; PutToDict(dict, "frequency", frequency); PutToDict(dict, "symbol_rate", parm_u_qpsk_symbol_rate); + PutToDict(dict, "orbital_position", orb_pos); + PutToDict(dict, "polarization", polarization); + switch(parm_u_qpsk_fec_inner) { case FEC_1_2: tmp = eDVBFrontendParametersSatellite::FEC_1_2; break; @@ -1224,7 +1225,7 @@ void eDVBFrontend::getTransponderData(ePyObject dest, bool original) switch(m_type) { case feSatellite: - fillDictWithSatelliteData(dest, original?parm:front, this); + fillDictWithSatelliteData(dest, original?parm:front, m_data[FREQ_OFFSET], m_cur_orbpos, m_cur_pol); break; case feCable: fillDictWithCableData(dest, original?parm:front); @@ -1750,6 +1751,8 @@ RESULT eDVBFrontend::prepare_sat(const eDVBFrontendParametersSatellite &feparm, feparm.fec, feparm.orbital_position); #endif + m_cur_pol = feparm.polarisation; + m_cur_orbpos = feparm.orbital_position; parm_u_qpsk_symbol_rate = feparm.symbol_rate; switch (feparm.inversion) { diff --git a/lib/dvb/frontend.h b/lib/dvb/frontend.h index 81334886..b6e3b6a4 100644 --- a/lib/dvb/frontend.h +++ b/lib/dvb/frontend.h @@ -84,6 +84,8 @@ private: char m_sec_filename[128]; #endif FRONTENDPARAMETERS parm; + int m_cur_orbpos; // only valid when this is a DVB-S tuner + int m_cur_pol; // only valid when this is a DVB-S tuner int m_state; ePtr m_sec; ePtr m_sn; diff --git a/lib/python/Components/Converter/StringList.py b/lib/python/Components/Converter/StringList.py index 08794b34..d424d39f 100644 --- a/lib/python/Components/Converter/StringList.py +++ b/lib/python/Components/Converter/StringList.py @@ -48,4 +48,4 @@ class StringList(Converter): index = property(getIndex, setIndex) def entry_changed(self, index): - self.downstream_elements.entry_changed(index) \ No newline at end of file + self.downstream_elements.entry_changed(index) diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py index 6d2ddce3..fa533c0b 100644 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py @@ -355,7 +355,7 @@ class PositionerSetup(Screen): self["snr_bar"].update() self["ber_bar"].update() self["lock_state"].update() - transponderdata = ConvertToHumanReadable(self.tuner.getTransponderData()) + transponderdata = ConvertToHumanReadable(self.tuner.getTransponderData(), "DVB-S") self["frequency_value"].setText(str(transponderdata.get("frequency"))) self["symbolrate_value"].setText(str(transponderdata.get("symbol_rate"))) self["fec_value"].setText(str(transponderdata.get("fec_inner"))) diff --git a/lib/python/Tools/Directories.py b/lib/python/Tools/Directories.py index 7dcd5876..b2e43a49 100644 --- a/lib/python/Tools/Directories.py +++ b/lib/python/Tools/Directories.py @@ -167,7 +167,7 @@ def getRecordingFilename(basename, dirname = None): basename = basename.replace('\xc2\x86', '').replace('\xc2\x87', '') for c in basename: - if c in non_allowed_characters: + if c in non_allowed_characters or ord(c) < 32: c = "_" filename += c diff --git a/lib/python/Tools/Transponder.py b/lib/python/Tools/Transponder.py index f37603c5..6868929c 100644 --- a/lib/python/Tools/Transponder.py +++ b/lib/python/Tools/Transponder.py @@ -1,8 +1,9 @@ from enigma import eDVBFrontendParametersSatellite, eDVBFrontendParametersCable, eDVBFrontendParametersTerrestrial -def ConvertToHumanReadable(tp): +def ConvertToHumanReadable(tp, type = None): ret = { } - type = tp.get("tuner_type", "None") + if type is None: + type = tp.get("tuner_type", "None") if type == "DVB-S": ret["tuner_type"] = _("Satellite") ret["inversion"] = { @@ -111,6 +112,8 @@ def ConvertToHumanReadable(tp): eDVBFrontendParametersTerrestrial.Inversion_Unknown : _("Auto"), eDVBFrontendParametersTerrestrial.Inversion_On : _("On"), eDVBFrontendParametersTerrestrial.Inversion_Off : _("Off")}[tp["inversion"]] + else: + print "ConvertToHumanReadable: no or unknown type in tpdata dict!" for x in tp.keys(): if not ret.has_key(x): ret[x] = tp[x] diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 81157ae5..2f91971a 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1877,20 +1877,7 @@ PyObject *eDVBServiceBase::getTransponderData(bool original) { ePtr fe; if(!channel->getFrontend(fe)) - { fe->getTransponderData(ret, original); - ePtr feparm; - channel->getCurrentFrontendParameters(feparm); - if (feparm) - { - eDVBFrontendParametersSatellite osat; - if (!feparm->getDVBS(osat)) - { - PutToDict(ret, "orbital_position", osat.orbital_position); - PutToDict(ret, "polarization", osat.polarisation); - } - } - } } } else