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:
WithoutPants
2022-09-21 15:39:41 +10:00
committed by GitHub
parent cffcd9f4b8
commit b74428cb42
7 changed files with 120 additions and 62 deletions

View File

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