add support for interactive debugging via manhole.telnet... add some
modules and provide functions to add to the namespace...
drop the media server since we now serve all of our content though
content..
[git-p4: depot-paths = "//depot/": change = 838]
import ZipStorage # w/ tarfile support, it will gobble up empty files!
import debug # my debugging module
debug.doDebugging(True) # open up debugging port
debug.insertnamespace('dvd', dvd)
debug.insertnamespace('shoutcast', shoutcast)
debug.insertnamespace('ZipStorage', ZipStorage)
from DIDLLite import TextItem, AudioItem, VideoItem, ImageItem, Resource, StorageFolder
from FSStorage import FSDirectory
import os
@@ -44,6 +50,7 @@ log.startLogging(sys.stdout)
from SSDP import SSDPServer, SSDP_PORT, SSDP_ADDR
s = SSDPServer()
debug.insertnamespace('s', s)
port = reactor.listenMulticast(SSDP_PORT, s)
port.joinGroup(SSDP_ADDR)
@@ -73,8 +80,10 @@ class RootDevice(static.Data):
static.Data.__init__(self, d, 'text/xml')
root = WebServer()
debug.insertnamespace('root', root)
content = resource.Resource()
cds = ContentDirectoryServer('My Media Server', klass = FSDirectory, path = 'media', urlbase = os.path.join(urlbase, 'content'), webbase = content) # This sets up the root to be the media dir so we don't have to enumerate the directory