Remove unused Path attribute

This commit is contained in:
Timmy Welch 2024-10-13 22:16:37 -07:00
parent dbf03d258c
commit 87c1a69b49
2 changed files with 3 additions and 5 deletions

View File

@ -459,7 +459,7 @@ func (s *Server) addCover(w http.ResponseWriter, r *http.Request) {
return return
default: default:
} }
s.hashingQueue <- ch.Im{Im: i, Format: format, ID: ch.ID{Domain: ch.Source(domain), ID: ID}, Path: ""} s.hashingQueue <- ch.Im{Im: i, Format: format, ID: ch.ID{Domain: ch.Source(domain), ID: ID}}
writeJson(w, http.StatusOK, result{Msg: "Success"}) writeJson(w, http.StatusOK, result{Msg: "Success"})
} }
@ -489,7 +489,7 @@ func (s *Server) hasher(workerID int, done func()) {
} }
elapsed := time.Since(start) elapsed := time.Since(start)
log.Printf("Hashing took %v: worker: %v. path: %s %s: %064b id: %s\n", elapsed, workerID, image.Path, hash.Hashes[0].Kind, hash.Hashes[0].Hash, hash.ID) log.Printf("Hashing took %v: worker: %v. %s: %064b id: %s\n", elapsed, workerID, hash.Hashes[0].Kind, hash.Hashes[0].Hash, hash.ID)
} }
} }
@ -509,7 +509,6 @@ func (s *Server) reader(workerID int, done func()) {
im := ch.Im{ im := ch.Im{
Im: i, Format: format, Im: i, Format: format,
ID: ch.ID{Domain: ch.Source(filepath.Base(filepath.Dir(filepath.Dir(path)))), ID: filepath.Base(filepath.Dir(path))}, ID: ch.ID{Domain: ch.Source(filepath.Base(filepath.Dir(filepath.Dir(path)))), ID: filepath.Base(filepath.Dir(path))},
Path: path,
} }
select { select {
case <-s.quit: case <-s.quit:

View File

@ -63,7 +63,6 @@ type Result struct {
type Im struct { type Im struct {
Im image.Image Im image.Image
Format string Format string
Path string
ID ID ID ID
} }