I've modified channel list skin's code to include a transponder or frequency information when browsing channel lists.
<widget borderWidth="2" source="ServiceEvent" foregroundColor="foreground" backgroundColor="secondBG" render="Label" position="598,635" size="571,25" transparent="1" noWrap="1" font="prive3; 22" zPosition="1"> <convert type="ServiceName2">TpansponderInfo</convert> </widget>
I want the terrestrial freq. to be shown in Mhz format , not Khz.
On ServiceName2.py file , line which contains:
elif f == 'F': # %F - frequency (dvb-s/s2/c/t) in KHz if type in ('DVB-S','DVB-C','DVB-T'): result += '%d'%(self.tpdata.get('frequency', 0) / 1000)
has been "slipt" to be different between DVB-T and DVB-S
elif f == 'F': # %F - frequency (dvb-s/s2/c/t) in KHz if type in ('DVB-S'): result += '%d'%(self.tpdata.get('frequency', 0) / 1000) if type in ('DVB-T','DVB-C'): result += '%.3f'%(((self.tpdata.get('frequency', 0) / 1000) +1) /1000)
The "+1" is there because terrestrial freq's. showed 569999 instead 570000
But I have a problem:
If I use the last code I've written, I get 184.000 , and the real value I'd have to get is 184.500 Mhz.
If I change code to
result += '%.3f'%((self.tpdata.get('frequency', 0) / 1000) +1)
I get : 184500.000
I want to get 184.500
How Could I do it ?