fix: sync issues
This commit is contained in:
@@ -87,12 +87,21 @@ func (s Store) Hashes() []string {
|
||||
}
|
||||
|
||||
// Exists
|
||||
func (s Store) HashExists(hash string) bool {
|
||||
func (s Store) HashExists(hash string) (VideoInfo, bool) {
|
||||
for _, m := range s {
|
||||
if m.Hash == hash {
|
||||
return true
|
||||
return m, true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
return VideoInfo{}, false
|
||||
}
|
||||
|
||||
func (s Store) Update(info VideoInfo) {
|
||||
for i, m := range s {
|
||||
if m.Hash == info.Hash {
|
||||
s[i] = info
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user