mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add filesystem based blob storage (#3187)
* Refactor transaction hooks. Add preCommit * Add BlobStore * Use blobStore for tag images * Use blobStore for studio images * Use blobStore for performer images * Use blobStore for scene covers * Don't generate screenshots in legacy directory * Run post-hooks outside original transaction * Use blobStore for movie images * Remove unnecessary DestroyImage methods * Add missing filter for scene cover * Add covers to generate options * Add generate cover option to UI * Add screenshot migration * Delete thumb files as part of screenshot migration
This commit is contained in:
@@ -508,12 +508,11 @@ func (s *scanJob) onNewFolder(ctx context.Context, file scanFile) (*Folder, erro
|
||||
}
|
||||
}
|
||||
|
||||
txn.AddPostCommitHook(ctx, func(ctx context.Context) error {
|
||||
txn.AddPostCommitHook(ctx, func(ctx context.Context) {
|
||||
// log at the end so that if anything fails above due to a locked database
|
||||
// error and the transaction must be retried, then we shouldn't get multiple
|
||||
// logs of the same thing.
|
||||
logger.Infof("%s doesn't exist. Creating new folder entry...", file.Path)
|
||||
return nil
|
||||
})
|
||||
|
||||
if err := s.Repository.FolderStore.Create(ctx, toCreate); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user