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()
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;
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);
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)
{
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 = 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)
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")))
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
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"] = {
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]
{
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