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:
bnkai
2019-11-15 19:23:58 +02:00
committed by Leopere
parent 4a5d2bd6e5
commit 5c0ec39db1
4 changed files with 113 additions and 1 deletions

View File

@@ -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
}