mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Associate funscript files on scan (#2978)
This commit is contained in:
@@ -195,6 +195,7 @@ type Store interface {
|
||||
// Decorator wraps the Decorate method to add additional functionality while scanning files.
|
||||
type Decorator interface {
|
||||
Decorate(ctx context.Context, fs FS, f File) (File, error)
|
||||
IsMissingMetadata(ctx context.Context, fs FS, f File) bool
|
||||
}
|
||||
|
||||
type FilteredDecorator struct {
|
||||
@@ -209,3 +210,11 @@ func (d *FilteredDecorator) Decorate(ctx context.Context, fs FS, f File) (File,
|
||||
}
|
||||
return f, nil
|
||||
}
|
||||
|
||||
func (d *FilteredDecorator) IsMissingMetadata(ctx context.Context, fs FS, f File) bool {
|
||||
if d.Accept(ctx, f) {
|
||||
return d.Decorator.IsMissingMetadata(ctx, fs, f)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user