{{t('setting.backup-restore.about','This tool allows you to backup and restore your FrankerFaceZ settings, including all settings from the Control Center along with other data such as favorited emotes and blocked games.')}}
this.error_desc=this.t('setting.backup-restore.read-error','Unable to read file.');
this.error=true;
return;
}
letdata;
try{
data=JSON.parse(contents);
}catch(err){
this.error_desc=this.t('setting.backup-restore.json-error','Unable to parse file as JSON.');
this.error=true;
return;
}
if(!data||data.version!==2){
this.error_desc=this.t('setting.backup-restore.old-file','This file is invalid or was created in another version of FrankerFaceZ and cannot be loaded.');
this.error=true;
return;
}
if(data.type!=='full'){
this.error_desc=this.t('setting.backup-restore.non-full','This file is not a full backup and cannot be restored with this tool.');
this.error_desc=this.t('setting.backup-restore.zip-error','Unable to parse ZIP archive.');
this.error=true;
}
try{
blobs=JSON.parse(blobs);
data=JSON.parse(data);
}catch(err){
this.error_desc=this.t('setting.backup-restore.json-error','Unable to parse file as JSON.');
this.error=true;
return;
}
if(!data||data.version!==2){
this.error_desc=this.t('setting.backup-restore.old-file','This file is invalid or was created in another version of FrankerFaceZ and cannot be loaded.');
this.error=true;
return;
}
if(data.type!=='full'){
this.error_desc=this.t('setting.backup-restore.non-full','This file is not a full backup and cannot be restored with this tool.');
this.error_desc=this.t('setting.backup-restore.blob-error','This backup contains binary data not supported by the current storage provider. Please change your storage provider in Data Management > Storage >> Provider.');
this.error=true;
return;
}
// Attempt to load all the blobs, to make sure they're all valid.
this.message=this.t('setting.backup-restore.zip-restored','{count,number} items and {blobs,number} binary blobs have been restored. Please refresh this page.',{