{#if stage === 0} Restore Your Library Before restoring a database backup, you must ensure your library has been restored or is otherwise already present. {#if integrity} {#each Object.entries(integrity.storageIntegrity) as [folder, { readable, writable }]} {i18nMap[folder as keyof typeof i18nMap]} ({writable ? 'readable and writable' : readable ? 'not writable' : 'not readable'}) {/each} {#each Object.entries(integrity.storageHeuristics) as [folder, { files }]} {#if folder !== 'backups'} {#if files} {i18nMap[folder as keyof typeof i18nMap]} has {files} folder(s) {:else} {i18nMap[folder as keyof typeof i18nMap]} is missing files! {/if} {#if !files && (folder === 'profile' || folder === 'upload')} You may be missing files {/if} {#if !files && (folder === 'encoded-video' || folder === 'thumbs')} You can regenerate these later in settings {/if} {#if !files && folder === 'library'} Using storage template? You may be missing files {/if} {/if} {/each} {:else} Loading integrity checks and heuristics... {/if} If this looks correct, continue to restoring a backup! {:else} Restore From Backup {/if}