mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 21:34:14 +01:00
* Add file scanner * Scan scene changes * Split scan files * Generalise scan * Refactor ffprobe * Refactor ffmpeg encoder * Move scene scan code to scene package * Move matchExtension to utils * Refactor gallery scanning * Refactor image scanning * Prevent race conditions on identical hashes * Refactor image thumbnail generation * Perform count concurrently * Allow progress increment before total set * Make progress updates more frequent
17 lines
307 B
Go
17 lines
307 B
Go
package file
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/stashapp/stash/pkg/utils"
|
|
)
|
|
|
|
type FSHasher struct{}
|
|
|
|
func (h *FSHasher) OSHash(src io.ReadSeeker, size int64) (string, error) {
|
|
return utils.OSHashFromReader(src, size)
|
|
}
|
|
|
|
func (h *FSHasher) MD5(src io.Reader) (string, error) {
|
|
return utils.MD5FromReader(src)
|
|
}
|