mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Various bug fixes (#2938)
* Don't recalculate MD5 if not enabled Remove MD5 if oshash has changed and MD5 was not calculated. * Fix panic in paged DLNA * Prevent identical hashes in stash-box drafts
This commit is contained in:
@@ -14,6 +14,18 @@ type Fingerprint struct {
|
||||
|
||||
type Fingerprints []Fingerprint
|
||||
|
||||
func (f *Fingerprints) Remove(type_ string) {
|
||||
var ret Fingerprints
|
||||
|
||||
for _, ff := range *f {
|
||||
if ff.Type != type_ {
|
||||
ret = append(ret, ff)
|
||||
}
|
||||
}
|
||||
|
||||
*f = ret
|
||||
}
|
||||
|
||||
func (f Fingerprints) Equals(other Fingerprints) bool {
|
||||
if len(f) != len(other) {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user