Skip to content

Commit

Permalink
fix: Don't reset cover on start event
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Aug 27, 2022
1 parent ee15de9 commit aade26e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/exif/aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func (a App) computeAndSaveAggregate(ctx context.Context, dir absto.Item) error
directoryAggregate := newAggregate()
var minDate, maxDate time.Time

previousAggregate, _ := a.GetAggregateFor(ctx, dir)

err := a.storageApp.Walk(ctx, dir.Pathname, func(item absto.Item) error {
if item.Pathname == dir.Pathname {
return nil
Expand Down Expand Up @@ -123,6 +125,7 @@ func (a App) computeAndSaveAggregate(ctx context.Context, dir absto.Item) error
}

return a.SaveAggregateFor(ctx, dir, provider.Aggregate{
Cover: previousAggregate.Cover,
Location: directoryAggregate.value(),
Start: minDate,
End: maxDate,
Expand Down

0 comments on commit aade26e

Please sign in to comment.