service.py 文件源码

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

项目:service.subtitles.tusubtitulo 作者: josecurioso2 项目源码 文件源码
def append_subtitle(item):
    listitem = xbmcgui.ListItem(label=item['language_name'],  label2=item['filename'], iconImage=item['rating'], thumbnailImage=item['lang'])

    listitem.setProperty("sync",  'true' if item["sync"] else 'false')
    listitem.setProperty("hearing_imp", 'true' if item["hearing_imp"] else 'false')

    ## below arguments are optional, it can be used to pass any info needed in download function
    ## anything after "action=download&" will be sent to addon once user clicks listed subtitle to downlaod
    url = "plugin://%s/?action=download&link=%s&filename=%s" % (__scriptid__, item['link'], item['filename'])

    ## add it to list, this can be done as many times as needed for all subtitles found
    xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url, listitem=listitem, isFolder=False)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号