def restore_skinshortcuts(temp_path):
'''restore skinshortcuts files'''
source_path = temp_path + u"skinshortcuts/"
if xbmcvfs.exists(source_path):
dest_path = u'special://profile/addon_data/script.skinshortcuts/'
for filename in xbmcvfs.listdir(source_path)[1]:
filename = filename.decode("utf-8")
sourcefile = source_path + filename
destfile = dest_path + filename
if filename == "SKINPROPERTIES.properties":
destfile = dest_path + filename.replace("SKINPROPERTIES", xbmc.getSkinDir())
elif xbmc.getCondVisibility("SubString(Skin.String(skinshortcuts-sharedmenu),false)"):
destfile = "%s-" % (xbmc.getSkinDir())
copy_file(sourcefile, destfile)
backuprestore.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录