mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +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:
@@ -26,8 +26,12 @@ func MD5FromFilePath(filePath string) (string, error) {
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
return MD5FromReader(f)
|
||||
}
|
||||
|
||||
func MD5FromReader(src io.Reader) (string, error) {
|
||||
h := md5.New()
|
||||
if _, err := io.Copy(h, f); err != nil {
|
||||
if _, err := io.Copy(h, src); err != nil {
|
||||
return "", err
|
||||
}
|
||||
checksum := h.Sum(nil)
|
||||
|
||||
Reference in New Issue
Block a user