mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Overwrite phash during generate if flag set (#1633)
This commit is contained in:
@@ -322,6 +322,7 @@ func (s *singleton) Generate(ctx context.Context, input models.GenerateMetadataI
|
||||
Scene: *scene,
|
||||
fileNamingAlgorithm: fileNamingAlgo,
|
||||
txnManager: s.TxnManager,
|
||||
Overwrite: overwrite,
|
||||
}
|
||||
wg.Add()
|
||||
go progress.ExecuteTask(fmt.Sprintf("Generating phash for %s", scene.Path), func() {
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
type GeneratePhashTask struct {
|
||||
Scene models.Scene
|
||||
Overwrite bool
|
||||
fileNamingAlgorithm models.HashAlgorithm
|
||||
txnManager models.TransactionManager
|
||||
}
|
||||
@@ -58,5 +59,5 @@ func (t *GeneratePhashTask) Start(wg *sizedwaitgroup.SizedWaitGroup) {
|
||||
}
|
||||
|
||||
func (t *GeneratePhashTask) shouldGenerate() bool {
|
||||
return !t.Scene.Phash.Valid
|
||||
return t.Overwrite || !t.Scene.Phash.Valid
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* Added de-DE language option. ([#1578](https://github.com/stashapp/stash/pull/1578))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
* Regenerate scene phash if overwrite flag is set. ([#1633](https://github.com/stashapp/stash/pull/1633))
|
||||
* Create .stash directory in $HOME only if required. ([#1623](https://github.com/stashapp/stash/pull/1623))
|
||||
* Include stash id when scraping performer from stash-box. ([#1608](https://github.com/stashapp/stash/pull/1608))
|
||||
* Fix infinity framerate values causing resolver error. ([#1607](https://github.com/stashapp/stash/pull/1607))
|
||||
|
||||
Reference in New Issue
Block a user