default.py 文件源码

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

项目:plugin.video.prime_instant 作者: liberty-developer 项目源码 文件源码
def addMovieToLibrary(movieID, title):
    #title = title.decode('iso-8859-1').encode('iso-8859-1')
    movieFolderName = (''.join(c for c in title if c not in '/\\:?"*|<>')).strip(' .')
    dir = os.path.join(libraryFolderMovies, movieFolderName)
    if not os.path.exists(dir):
        xbmcvfs.mkdir(unicode(dir).encode("iso-8859-1"))
        fh = xbmcvfs.File(unicode(os.path.join(dir, "movie.strm")).encode("iso-8859-1"), 'w')
        fh.write(unicode('plugin://'+addonID+'/?mode=playVideo&url='+movieID).encode("utf-8"))
        fh.close()
    if updateDB:
        xbmc.executebuiltin(unicode('UpdateLibrary(video)').encode("utf-8"))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号