Merge branch 'master' of /home/tmbinc/enigma2-git into tmbinc/FixTimingBugs
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 13 Feb 2009 13:47:32 +0000 (14:47 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 13 Feb 2009 13:47:32 +0000 (14:47 +0100)
Conflicts:

lib/python/Components/Converter/StringList.py

RecordTimer.py
lib/dvb/frontend.cpp
lib/dvb/frontend.h
lib/python/Components/Converter/StringList.py
lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py
lib/python/Tools/Directories.py
lib/python/Tools/Transponder.py
lib/service/servicedvb.cpp

index f8e0dbd7472ca5d9013b1ed8c2af6b509d1b980c..aeff9d05f2220e3003ad919348ac24d57f6e8cd1 100644 (file)
@@ -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()
index e0291ec1731eb91ae4477d2df67c813dcb817b56..5df179314eb212377785cbccac8d97873158183d 100644 (file)
@@ -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)
                {
index 8133488641d57e96a97e5153aa907227a2764b2c..b6e3b6a4299d734e7271604e206438cea0acd8fc 100644 (file)
@@ -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<iDVBSatelliteEquipmentControl> m_sec;
        ePtr<eSocketNotifier> m_sn;
index 08794b343a8fda60d2e62c06f774f8cf47e973fe..d424d39f804028a1b052ec3869665ac8b97c282e 100644 (file)
@@ -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)
index 6d2ddce36069ea787113582fe08f4e0fd7b32b9e..fa533c0b4d478aa08a4be245b7f1cf9336e2200d 100644 (file)
@@ -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")))
index 7dcd5876e9660c16911520512146b15b3a036b1f..b2e43a49fc6aaaab2ca010122cf0b1eefd880e4a 100644 (file)
@@ -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
 
index f37603c5cf1122796a11f8e3427b28aedf6a78a4..6868929c022d661b44881672fbf2cd5061722000 100644 (file)
@@ -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]
index 81157ae5325d77c17314cd1b05ff6b7a588e1bce..2f91971a43931687e0e380aefedd0450065daae5 100644 (file)
@@ -1877,20 +1877,7 @@ PyObject *eDVBServiceBase::getTransponderData(bool original)
                {
                        ePtr<iDVBFrontend> fe;
                        if(!channel->getFrontend(fe))
-                       {
                                fe->getTransponderData(ret, original);
-                               ePtr<iDVBFrontendParameters> 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