mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Images section (#813)
* Add new configuration options * Refactor scan/clean * Schema changes * Add details to galleries * Remove redundant code * Refine thumbnail generation * Gallery overhaul * Don't allow modifying zip gallery images * Show gallery card overlays * Hide zoom slider when not in grid mode
This commit is contained in:
17
pkg/manager/gallery.go
Normal file
17
pkg/manager/gallery.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package manager
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/stashapp/stash/pkg/logger"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
)
|
||||
|
||||
func DeleteGalleryFile(gallery *models.Gallery) {
|
||||
if gallery.Path.Valid {
|
||||
err := os.Remove(gallery.Path.String)
|
||||
if err != nil {
|
||||
logger.Warnf("Could not delete file %s: %s", gallery.Path.String, err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user