aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Converter/RadioText.py
blob: 59885c0a689602ed8d1b0f4aa6c8288421eafa58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
		text = ""
		if rt:
			if self.type == "RadioText":
				text = rt.getRadioText()
		return text.decode("latin-1").encode("utf-8")
	text = property(getText)