mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Add a cache for gallery thumbnails (#496)
This commit is contained in:
@@ -34,11 +34,16 @@ func (t *ScanTask) Start(wg *sync.WaitGroup) {
|
||||
func (t *ScanTask) scanGallery() {
|
||||
qb := models.NewGalleryQueryBuilder()
|
||||
gallery, _ := qb.FindByPath(t.FilePath)
|
||||
|
||||
if gallery != nil {
|
||||
// We already have this item in the database, keep going
|
||||
return
|
||||
}
|
||||
|
||||
ok, err := utils.IsZipFileUncompressed(t.FilePath)
|
||||
if err == nil && !ok {
|
||||
logger.Warnf("%s is using above store (0) level compression.", t.FilePath)
|
||||
}
|
||||
checksum, err := t.calculateChecksum()
|
||||
if err != nil {
|
||||
logger.Error(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user