blob: e4499950c88a84be68ec13397576be6779572d18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
from Components.Converter.Converter import Converter
from Components.Element import cached
class RadioText(Converter, object):
def __init__(self, type):
Converter.__init__(self, type)
self.type = type
@cached
def getText(self):
rt = self.source.radiotext
if rt is None:
return "N/A"
text = rt.getRadioText()
if self.type == "RadioText-UTF8":
return text.decode("latin-1").encode("utf-8")
else:
return text
text = property(getText)
|