default.py 文件源码

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

项目:catchup4kodi 作者: catchup4kodi 项目源码 文件源码
def PLAY_RTE(name,url,iconimage):
    name=htmlcleaner.cleanUnicode(name)
    if 'feeds' in url:

        link=OPEN_URL(url)
        URL=re.compile('media:content url="(.+?)"').findall(link)[0]
        import F4MProxy
        player=F4MProxy.f4mProxyHelper()
        player.playF4mLink(URL, name,iconimage)


    else:
        if 'f4m' in url:
            import F4MProxy
            player=F4MProxy.f4mProxyHelper()
            player.playF4mLink(url, name,iconimage)
        else:
            select=[]
            returned=[]
            r='http://www.rte.ie/manifests/%s.f4m'%url
            html=OPEN_URL(r)
            match=re.compile('href=".+?-(.+?)\.f4m"').findall(html)
            for i in match:
                select.append(i+'P')
                returned.append(i)

            link=(returned[xbmcgui.Dialog().select('Please Select', select)])
            stream='http://cdn.rasset.ie/hls-live/_definst_/%s/%s-%s.m3u8' %(url,url,link)
            liz = xbmcgui.ListItem(name, iconImage='DefaultVideo.png', thumbnailImage=iconimage)
            liz.setInfo(type='Video', infoLabels={'Title':name})
            liz.setProperty("IsPlayable","true")
            liz.setPath(stream)
            xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, liz)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号