mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +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,
|
Scene: *scene,
|
||||||
fileNamingAlgorithm: fileNamingAlgo,
|
fileNamingAlgorithm: fileNamingAlgo,
|
||||||
txnManager: s.TxnManager,
|
txnManager: s.TxnManager,
|
||||||
|
Overwrite: overwrite,
|
||||||
}
|
}
|
||||||
wg.Add()
|
wg.Add()
|
||||||
go progress.ExecuteTask(fmt.Sprintf("Generating phash for %s", scene.Path), func() {
|
go progress.ExecuteTask(fmt.Sprintf("Generating phash for %s", scene.Path), func() {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import (
|
|||||||
|
|
||||||
type GeneratePhashTask struct {
|
type GeneratePhashTask struct {
|
||||||
Scene models.Scene
|
Scene models.Scene
|
||||||
|
Overwrite bool
|
||||||
fileNamingAlgorithm models.HashAlgorithm
|
fileNamingAlgorithm models.HashAlgorithm
|
||||||
txnManager models.TransactionManager
|
txnManager models.TransactionManager
|
||||||
}
|
}
|
||||||
@@ -58,5 +59,5 @@ func (t *GeneratePhashTask) Start(wg *sizedwaitgroup.SizedWaitGroup) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *GeneratePhashTask) shouldGenerate() bool {
|
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))
|
* Added de-DE language option. ([#1578](https://github.com/stashapp/stash/pull/1578))
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 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))
|
* 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))
|
* 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))
|
* Fix infinity framerate values causing resolver error. ([#1607](https://github.com/stashapp/stash/pull/1607))
|
||||||
|
|||||||
Reference in New Issue
Block a user