Author: dmeyer
Date: Fri Jan 12 21:55:43 2007
New Revision: 8972
Modified:
trunk/tvserver/src/config.py
trunk/tvserver/src/epg.py
Log:
add list of channels to doc and set type
Modified: trunk/tvserver/src/config.py
==============================================================================
--- trunk/tvserver/src/config.py (original)
+++ trunk/tvserver/src/config.py Fri Jan 12 21:55:43 2007
@@ -43,9 +43,10 @@
config.epg.add_variable(name, module.config)
# EPG mapping
-config.epg.add_variable('mapping', Dict(name='mapping', type=unicode,
- schema=Var(type=unicode),
- desc=_('EPG channel mapping')))
+config.epg.add_variable('mapping', Dict(
+ name='mapping', type=unicode,
+ schema=Var(type=unicode),
+ desc=_('EPG channel mapping. Leave blank for channels without epg (case
sentive).')))
config.load('/etc/freevo/tvserver.conf')
# if started as user add personal config file
Modified: trunk/tvserver/src/epg.py
==============================================================================
--- trunk/tvserver/src/epg.py (original)
+++ trunk/tvserver/src/epg.py Fri Jan 12 21:55:43 2007
@@ -64,6 +64,19 @@
}
self.updating = False
+ # update config.epg.mapping information
+ channels = [ c.name for c in self.channels() ] + [ u'' ]
+ mapping = config.epg._cfg_get('mapping')
+ mapping._schema._type = channels
+ txt = '\nKnown channels are '
+ for c in channels:
+ if len(txt) + len(c) >= 78:
+ mapping._desc += txt.rstrip() + '\n'
+ txt = ''
+ txt += c + ', '
+ mapping._desc += txt.rstrip(', ')
+ config.save()
+
def channels(self):
"""
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog