simple seeking implementation
This commit is contained in:
11
main.go
11
main.go
@@ -65,6 +65,7 @@ func main() {
|
||||
|
||||
var Volume int64
|
||||
var Random, Repeat bool
|
||||
var SeekOffset = viper.GetInt("SEEK_OFFSET")
|
||||
|
||||
if _v, err := CONN.Status(); err != nil {
|
||||
utils.Print("RED", "Could Not Get the MPD Status\n")
|
||||
@@ -218,6 +219,16 @@ func main() {
|
||||
"FocusBuffSearch": func() {
|
||||
views.GetCurrentView().FocusBuffSearchView()
|
||||
},
|
||||
"SeekForward": func() {
|
||||
if err := CONN.SeekCur(time.Second*time.Duration(SeekOffset), true); err != nil {
|
||||
notify.Notify.Send("Could Not Seek Forward in the Song")
|
||||
}
|
||||
},
|
||||
"SeekBackward": func() {
|
||||
if err := CONN.SeekCur(-1*time.Second*time.Duration(SeekOffset), true); err != nil {
|
||||
notify.Notify.Send("Could Not Seek Backward in the Song")
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
// Generating the Key Map Based on the Function Map Here Basically the Values will be flipped
|
||||
|
||||
Reference in New Issue
Block a user