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"))
default.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录