Author: duncan
Date: Fri Dec 29 22:55:06 2006
New Revision: 8864
Modified:
branches/rel-1/freevo/src/helpers/webserver.py
Log:
Changed the naming rules only for tuples with 2 items
Modified: branches/rel-1/freevo/src/helpers/webserver.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/webserver.py (original)
+++ branches/rel-1/freevo/src/helpers/webserver.py Fri Dec 29 22:55:06 2006
@@ -92,12 +92,18 @@
root = static.File(docRoot)
root.processors = { '.rpy': script.ResourceScript, }
- for (item, dir_str) in config.VIDEO_ITEMS:
- root.putChild(dir_str.replace("/", "_"), static.File(dir_str))
- for (item, dir_str) in config.AUDIO_ITEMS:
- root.putChild(dir_str.replace("/", "_"), static.File(dir_str))
- for (item, dir_str) in config.IMAGE_ITEMS:
- root.putChild(dir_str.replace("/", "_"), static.File(dir_str))
+ for item in config.VIDEO_ITEMS:
+ if isinstance(item, tuple) and len(item) == 2:
+ (title, path) = item
+ root.putChild(path.replace("/", "_"), static.File(path))
+ for item in config.AUDIO_ITEMS:
+ if isinstance(item, tuple) and len(item) == 2:
+ (title, path) = item
+ root.putChild(path.replace("/", "_"), static.File(path))
+ for item in config.IMAGE_ITEMS:
+ if isinstance(item, tuple) and len(item) == 2:
+ (title, path) = item
+ root.putChild(path.replace("/", "_"), static.File(path))
root.putChild(config.TV_RECORD_DIR.replace("/", "_"),
static.File(config.TV_RECORD_DIR))
root.putChild('vhost', vhost.VHostMonsterResource())
-------------------------------------------------------------------------
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