Follow track change when toggle
This commit is contained in:
parent
cc301da971
commit
69ddfd48e9
3 changed files with 18 additions and 5 deletions
|
|
@ -58,6 +58,10 @@ func (t *Track) Rename(newName string) error {
|
|||
}
|
||||
|
||||
t.Path = newPath
|
||||
|
||||
// Recalculate hash
|
||||
hash := sha512.Sum512([]byte(t.Path))
|
||||
t.Id = hash[:]
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -73,6 +77,10 @@ func (t *Track) MoveTo(path string) error {
|
|||
}
|
||||
|
||||
t.Path = path
|
||||
|
||||
// Recalculate hash
|
||||
hash := sha512.Sum512([]byte(t.Path))
|
||||
t.Id = hash[:]
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue