mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Calculate and print job totals for scan and generate tasks (#188)
* Calculate and print job totals for scan and generate tasks * Cosmetic print fixes
This commit is contained in:
@@ -205,3 +205,20 @@ func (t *ScanTask) calculateChecksum() (string, error) {
|
||||
logger.Debugf("Checksum calculated: %s", checksum)
|
||||
return checksum, nil
|
||||
}
|
||||
|
||||
func (t *ScanTask) doesPathExist() bool {
|
||||
if filepath.Ext(t.FilePath) == ".zip" {
|
||||
qb := models.NewGalleryQueryBuilder()
|
||||
gallery, _ := qb.FindByPath(t.FilePath)
|
||||
if gallery != nil {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
qb := models.NewSceneQueryBuilder()
|
||||
scene, _ := qb.FindByPath(t.FilePath)
|
||||
if scene != nil {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user