plugin.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:enigma2-plugins 作者: opendreambox 项目源码 文件源码
def sessionstart(reason, **kwargs):
    if reason == 0 and "session" in kwargs:
        try:
            from Plugins.Extensions.WebInterface.WebChilds.Toplevel import addExternalChild
            from Plugins.Extensions.WebInterface.WebChilds.Screenpage import ScreenPage
            from twisted.python import util
            from twisted.web import static
            if hasattr(static.File, 'render_GET'):
                class File(static.File):
                    def render_POST(self, request):
                        return self.render_GET(request)
            else:
                File = static.File
            session = kwargs["session"]
            root = File(util.sibpath(__file__, "web-data"))
            root.putChild("web", ScreenPage(session, util.sibpath(__file__, "web"), True))
            addExternalChild( ("internetradio", root, "Internet-Radio", "1", True) )
        except ImportError:
            pass # pah!
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号