backuprestore.py 文件源码

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

项目:script.skin.helper.skinbackup 作者: marcelveldt 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号