def backup_skinsettings(self, dest_file, filters, temp_path):
'''backup the skinsettings (guisettings)'''
# save guisettings
skinfile = xbmcvfs.File(dest_file, "w")
skinsettings = self.get_skinsettings(filters)
skinfile.write(repr(skinsettings))
skinfile.close()
# copy any custom skin images or themes
for item in ["custom_images/", "themes/"]:
custom_images_folder = u"special://profile/addon_data/%s/%s" % (xbmc.getSkinDir(), item)
if xbmcvfs.exists(custom_images_folder):
custom_images_folder_temp = os.path.join(temp_path, item)
for file in xbmcvfs.listdir(custom_images_folder)[1]:
source = os.path.join(custom_images_folder, file)
dest = os.path.join(custom_images_folder_temp, file)
copy_file(source, dest)
backuprestore.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录