default.py 文件源码

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

项目:catchup4kodi 作者: catchup4kodi 项目源码 文件源码
def AtoZ():
    nameurl=[]
    urlurl=[]
    for name in char_range('A', 'Z'):
        nameurl.append(name)
        urlurl.append(name.upper())

    URL = 'http://vschedules.uktv.co.uk/mobile/v2/brand_list?channel=&letter=%s&&platform=ios&app_ver=4.1.0' %  urlurl[xbmcgui.Dialog().select('Please Select', nameurl)]
    response=OPEN_URL(URL)

    link=json.loads(response)


    for field in link:
        count=field['video_count']
        channel=field['channel'].encode("utf-8")
        color='grey'
        if 'Dave' in channel:
            color='green'
        if 'Drama' in channel:
            color='red' 
        if 'Yesterday' in channel:
            color='yellow'
        if 'Really' in channel:
            color='orange'   
        name= field['brand_name'].encode("utf-8") + ' (%s Episodes) - [COLOR %s]%s[/COLOR]' % (str(count),color,channel)
        iconimage= field['brand_image'].encode("utf-8")
        brand_id=field['brand_id']
        addDir(name.strip(),str(brand_id),2,iconimage,'')
        xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_VIDEO_TITLE)            
    setView('movies', 'default')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号