Using fhs/gompd/v2

This commit is contained in:
aditya-K2
2022-09-09 00:46:38 +05:30
parent 7f4e1460b8
commit b2c5575c8b
8 changed files with 13 additions and 13 deletions

View File

@@ -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")
}
}

View File

@@ -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))
}