implement mandatory fields for custom formatters
This commit is contained in:
parent
bebd4318ec
commit
560798bf7d
6 changed files with 37 additions and 1 deletions
|
|
@ -29,6 +29,8 @@ __all__ = ['Radioob']
|
|||
|
||||
|
||||
class RadioListFormatter(IFormatter):
|
||||
MANDATORY_FIELDS = ('id', 'title', 'description')
|
||||
|
||||
count = 0
|
||||
|
||||
def flush(self):
|
||||
|
|
@ -47,6 +49,7 @@ class RadioListFormatter(IFormatter):
|
|||
result += ' (Current: %s - %s)' % (item['current'].artist, item['current'].title)
|
||||
return result
|
||||
|
||||
|
||||
class Radioob(ReplApplication):
|
||||
APPNAME = 'radioob'
|
||||
VERSION = '0.4'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue