def getToplevel(session): root = File(util.sibpath(__file__, "web-data/tpl/default")) root.putChild("web", ScreenPage(session, util.sibpath(__file__, "web"), True) ) # "/web/*" root.putChild("web-data", File(util.sibpath(__file__, "web-data"))) root.putChild("file", FileStreamer()) root.putChild("grab", GrabResource()) res = IPKGResource() root.putChild("opkg", res) root.putChild("ipkg", res) root.putChild("play", ServiceplayerResource(session)) root.putChild("wap", RedirectorResource("/mobile/")) root.putChild("mobile", ScreenPage(session, util.sibpath(__file__, "mobile"), True) ) root.putChild("upload", UploadResource()) root.putChild("servicelist", ServiceList(session)) root.putChild("streamcurrent", RedirecToCurrentStreamResource(session)) if config.plugins.Webinterface.includemedia.value is True: root.putChild("media", File("/media")) root.putChild("hdd", File("/media/hdd")) importExternalModules() for child in externalChildren: if len(child) > 1: root.putChild(child[0], child[1]) return root
def getToplevel(session): root = static.File(util.sibpath(__file__, "web-data/tpl/default")) root.putChild("web", ScreenPage(session, util.sibpath(__file__, "web"), True)) # "/web/*" root.putChild("web-data", static.File(util.sibpath(__file__, "web-data"))) root.putChild("file", FileStreamer()) root.putChild("grab", GrabResource()) res = IPKGResource() root.putChild("opkg", res) root.putChild("ipkg", res) root.putChild("play", ServiceplayerResource(session)) root.putChild("wap", RedirectorResource("/mobile/")) root.putChild("mobile", ScreenPage(session, util.sibpath(__file__, "mobile"), True)) root.putChild("upload", UploadResource()) root.putChild("servicelist", ServiceList(session)) root.putChild("streamcurrent", RedirecToCurrentStreamResource(session)) if config.plugins.Webinterface.includemedia.value is True: root.putChild("media", static.File("/media")) root.putChild("hdd", static.File("/media/hdd")) importExternalModules() for child in externalChildren: if len(child) == 2: root.putChild(child[0], child[1]) return root