From b5ca0a1b4676eea8cf2fd9966634cac73bd46e5b Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Tue, 10 Oct 2006 19:54:15 +0000 Subject: show radio (rds) text when available... feel free to make it nicer --- lib/python/Components/Converter/RadioText.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/python/Components/Converter/RadioText.py (limited to 'lib/python/Components/Converter/RadioText.py') diff --git a/lib/python/Components/Converter/RadioText.py b/lib/python/Components/Converter/RadioText.py new file mode 100644 index 00000000..77ec58ed --- /dev/null +++ b/lib/python/Components/Converter/RadioText.py @@ -0,0 +1,15 @@ +from Components.Converter.Converter import Converter +from Components.Element import cached + +class RadioText(Converter, object): + def __init__(self, type): + Converter.__init__(self, type) + + @cached + def getText(self): + rt = self.source.radiotext + if rt is None: + return "N/A" + return rt + + text = property(getText) -- cgit v1.2.3