From b2c5575c8ba4a25c6bc53e59183ee8228b6b1420 Mon Sep 17 00:00:00 2001 From: aditya-K2 Date: Fri, 9 Sep 2022 00:46:38 +0530 Subject: [PATCH] Using `fhs/gompd/v2` --- client/client.go | 6 +++--- client/files.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- main.go | 2 +- ui/progressBar.go | 2 +- views/buffsearchview.go | 4 ++-- views/fileView.go | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/client.go b/client/client.go index 28b867a..56ee8b4 100644 --- a/client/client.go +++ b/client/client.go @@ -6,7 +6,7 @@ import ( "github.com/aditya-K2/fuzzy" "github.com/aditya-K2/gomp/notify" - "github.com/fhs/gompd/mpd" + "github.com/fhs/gompd/v2/mpd" "strings" ) @@ -138,8 +138,8 @@ func AddArtist(a map[string]map[string]map[string]string, artist string) { // Adds Specified Track to the Playlist func AddTitle(a map[string]map[string]map[string]string, artist, alb, track string, addAndPlay bool) { if addAndPlay { - id, err := Conn.AddId(a[artist][alb][track], -1) - Conn.PlayId(id) + id, err := Conn.AddID(a[artist][alb][track], -1) + Conn.PlayID(id) if err != nil { notify.Notify.Send("Could Not Add Track : " + track) } diff --git a/client/files.go b/client/files.go index 7e2f770..77c432c 100644 --- a/client/files.go +++ b/client/files.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/fhs/gompd/mpd" + "github.com/fhs/gompd/v2/mpd" ) type FileNode struct { diff --git a/go.mod b/go.mod index 058689d..d790517 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/aditya-K2/fuzzy v0.1.1-0.20211128173834-d0023b66cdd4 github.com/aditya-K2/tview v0.0.0-20211115161300-6b99c2c2658c github.com/bogem/id3v2 v1.2.0 - github.com/fhs/gompd v1.0.1 + github.com/fhs/gompd/v2 v2.2.0 github.com/gdamore/tcell/v2 v2.4.1-0.20210905002822-f057f0a857a1 github.com/mewkiz/flac v1.0.7 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 diff --git a/go.sum b/go.sum index e13bb7e..31054bf 100644 --- a/go.sum +++ b/go.sum @@ -90,8 +90,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fhs/gompd v1.0.1 h1:kBcAhjnAPJQAylZXR0TeH+d2vpjawXlTtKYguqNlF4A= -github.com/fhs/gompd v1.0.1/go.mod h1:b219/mNa9PvRqvkUip51b23hGL3iX4d4q3gNXdtrD04= +github.com/fhs/gompd/v2 v2.2.0 h1:zdSYAAOzQ5cCCgYa5CoXkL0Vr0Cqb/b5JmTobirLc90= +github.com/fhs/gompd/v2 v2.2.0/go.mod h1:nNdZtcpD5VpmzZbRl5rV6RhxeMmAWTxEsSIMBkmMIy4= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= diff --git a/main.go b/main.go index 5b2d221..de183d5 100644 --- a/main.go +++ b/main.go @@ -14,7 +14,7 @@ import ( "github.com/aditya-K2/gomp/views" "github.com/aditya-K2/fuzzy" - "github.com/fhs/gompd/mpd" + "github.com/fhs/gompd/v2/mpd" "github.com/gdamore/tcell/v2" "github.com/spf13/viper" ) diff --git a/ui/progressBar.go b/ui/progressBar.go index 25c132c..0143c7a 100644 --- a/ui/progressBar.go +++ b/ui/progressBar.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/fhs/gompd/mpd" + "github.com/fhs/gompd/v2/mpd" "github.com/gdamore/tcell/v2" "github.com/aditya-K2/gomp/utils" diff --git a/views/buffsearchview.go b/views/buffsearchview.go index ec14441..e8d216b 100644 --- a/views/buffsearchview.go +++ b/views/buffsearchview.go @@ -24,11 +24,11 @@ func (s BuffSearchView) ShowChildrenContent() { r, _ := UI.ExpandedView.GetSelection() SetCurrentView(FView) if len(client.DirTree.Children[r].Children) == 0 { - if id, err := CONN.AddId(client.DirTree.Children[client.Matches[r].Index].AbsolutePath, -1); err != nil { + if id, err := CONN.AddID(client.DirTree.Children[client.Matches[r].Index].AbsolutePath, -1); err != nil { notify.Notify.Send(fmt.Sprintf("Could Not add the Song %s to the Playlist", client.DirTree.Children[client.Matches[r].Index].AbsolutePath)) } else { - if err := CONN.PlayId(id); err != nil { + if err := CONN.PlayID(id); err != nil { notify.Notify.Send("Could not Play the Song") } } diff --git a/views/fileView.go b/views/fileView.go index 551d898..ee0f304 100644 --- a/views/fileView.go +++ b/views/fileView.go @@ -24,11 +24,11 @@ func (f FileView) ShowChildrenContent() { r, _ := UI.ExpandedView.GetSelection() SetCurrentView(FView) if len(client.DirTree.Children[r].Children) == 0 { - if id, err := CONN.AddId(client.DirTree.Children[r].AbsolutePath, -1); err != nil { + if id, err := CONN.AddID(client.DirTree.Children[r].AbsolutePath, -1); err != nil { notify.Notify.Send(fmt.Sprintf("Could not Add Song %s", client.DirTree.Children[r].Path)) } else { - if err := CONN.PlayId(id); err != nil { + if err := CONN.PlayID(id); err != nil { notify.Notify.Send(fmt.Sprintf("Could Not Play Song %s", client.DirTree.Children[r].Path)) }