[git-p4: depot-paths = "//depot/": change = 1245]main
| @@ -71,7 +71,7 @@ Ideas for future improvements: | |||||
| of types for devices to only present the optimal type. Less of | of types for devices to only present the optimal type. Less of | ||||
| an issue now the PS3 video support has been expanded. | an issue now the PS3 video support has been expanded. | ||||
| v0.x: | |||||
| v0.5: | |||||
| Support multiple SSDP servers on the same box. | Support multiple SSDP servers on the same box. | ||||
| Fix SSDP to set the max-age to 7 days. We now retransmit replies | Fix SSDP to set the max-age to 7 days. We now retransmit replies | ||||
| and reannounce ourselves randomly before our original announcement | and reannounce ourselves randomly before our original announcement | ||||
| @@ -104,7 +104,16 @@ class RootDevice(static.Data): | |||||
| root = WebServer() | root = WebServer() | ||||
| debug.insertnamespace('root', root) | debug.insertnamespace('root', root) | ||||
| content = resource.Resource() | 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 | |||||
| mediapath = 'media' | |||||
| if not os.path.isdir(mediapath): | |||||
| print >>sys.stderr, \ | |||||
| 'Sorry, %s is not a directory, no content to serve.' % `mediapath` | |||||
| sys.exit(1) | |||||
| # This sets up the root to be the media dir so we don't have to | |||||
| # enumerate the directory | |||||
| cds = ContentDirectoryServer('My Media Server', klass=FSDirectory, | |||||
| path=mediapath, urlbase=os.path.join(urlbase, 'content'), webbase=content) | |||||
| debug.insertnamespace('cds', cds) | debug.insertnamespace('cds', cds) | ||||
| root.putChild('ContentDirectory', cds) | root.putChild('ContentDirectory', cds) | ||||
| cds = cds.control | cds = cds.control | ||||
| @@ -233,7 +233,7 @@ class ShoutProxy(resource.Resource): | |||||
| def processRequest(self, ign, request): | def processRequest(self, ign, request): | ||||
| self.startNextConnection(request) | self.startNextConnection(request) | ||||
| def errRequest(self, ign, request): | |||||
| def errRequest(self, failure, request): | |||||
| request.write(failure.render(self.request)) | request.write(failure.render(self.request)) | ||||
| request.finish() | request.finish() | ||||