def get_user_colorthemes(self):
'''get all user stored color themes as listitems'''
listitems = []
for file in xbmcvfs.listdir(self.userthemes_path)[1]:
if file.endswith(".theme"):
file = file.decode("utf-8")
themefile = self.userthemes_path + file
label = file.replace(".theme", "")
icon = themefile.replace(".theme", ".jpg")
if not xbmcvfs.exists(icon):
icon = ""
desc = "user defined theme"
if label == self.get_activetheme():
desc = xbmc.getLocalizedString(461)
listitem = xbmcgui.ListItem(label, iconImage=icon)
listitem.setLabel2(desc)
listitem.setPath(themefile)
listitems.append(listitem)
return listitems
colorthemes.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录