Update module github.com/gopxl/beep to v2 #9

Merged
sagi merged 1 commit from inspector_gadget/github.com-gopxl-beep-2.x into main 2024-12-15 14:15:57 +00:00
3 changed files with 5 additions and 8 deletions

2
go.mod
View file

@ -7,7 +7,6 @@ require (
github.com/delucks/go-subsonic v0.0.0-20240806025900-2a743ec36238 github.com/delucks/go-subsonic v0.0.0-20240806025900-2a743ec36238
github.com/gdamore/tcell/v2 v2.7.4 github.com/gdamore/tcell/v2 v2.7.4
github.com/godbus/dbus/v5 v5.1.0 github.com/godbus/dbus/v5 v5.1.0
github.com/gopxl/beep v1.4.1
github.com/gopxl/beep/v2 v2.1.0 github.com/gopxl/beep/v2 v2.1.0
github.com/quarckster/go-mpris-server v1.0.3 github.com/quarckster/go-mpris-server v1.0.3
github.com/rivo/tview v0.0.0-20241103174730-c76f7879f592 github.com/rivo/tview v0.0.0-20241103174730-c76f7879f592
@ -23,7 +22,6 @@ require (
github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect github.com/rivo/uniseg v0.4.7 // indirect
github.com/stretchr/testify v1.9.0 // indirect
golang.org/x/sys v0.18.0 // indirect golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect

3
go.sum
View file

@ -15,8 +15,7 @@ github.com/gdamore/tcell/v2 v2.7.4 h1:sg6/UnTM9jGpZU+oFYAsDahfchWAFW8Xx2yFinNSAY
github.com/gdamore/tcell/v2 v2.7.4/go.mod h1:dSXtXTSK0VsW1biw65DZLZ2NKr7j0qP/0J7ONmsraWg= github.com/gdamore/tcell/v2 v2.7.4/go.mod h1:dSXtXTSK0VsW1biw65DZLZ2NKr7j0qP/0J7ONmsraWg=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gopxl/beep v1.4.1 h1:WqNs9RsDAhG9M3khMyc1FaVY50dTdxG/6S6a3qsUHqE= github.com/gopxl/beep/v2 v2.1.0 h1:Jv95iHw3aNWoAa/J78YyXvOvMHH2ZGeAYD5ug8tVt8c=
github.com/gopxl/beep v1.4.1/go.mod h1:A1dmiUkuY8kxsvcNJNUBIEcchmiP6eUyCHSxpXl0YO0=
github.com/gopxl/beep/v2 v2.1.0/go.mod h1:sQvj2oSsu8fmmDWH3t0DzIe0OZzTW6/TJEHW4Ku+22o= github.com/gopxl/beep/v2 v2.1.0/go.mod h1:sQvj2oSsu8fmmDWH3t0DzIe0OZzTW6/TJEHW4Ku+22o=
github.com/hajimehoshi/go-mp3 v0.3.4 h1:NUP7pBYH8OguP4diaTZ9wJbUbk3tC0KlfzsEpWmYj68= github.com/hajimehoshi/go-mp3 v0.3.4 h1:NUP7pBYH8OguP4diaTZ9wJbUbk3tC0KlfzsEpWmYj68=
github.com/hajimehoshi/go-mp3 v0.3.4/go.mod h1:fRtZraRFcWb0pu7ok0LqyFhCUrPeMsGRSVop0eemFmo= github.com/hajimehoshi/go-mp3 v0.3.4/go.mod h1:fRtZraRFcWb0pu7ok0LqyFhCUrPeMsGRSVop0eemFmo=

View file

@ -6,9 +6,9 @@ import (
"git.dayanhub.com/sagi/subsonic-tui/internal/client" "git.dayanhub.com/sagi/subsonic-tui/internal/client"
"github.com/delucks/go-subsonic" "github.com/delucks/go-subsonic"
"github.com/gopxl/beep" "github.com/gopxl/beep/v2"
"github.com/gopxl/beep/mp3" "github.com/gopxl/beep/v2/mp3"
"github.com/gopxl/beep/speaker" "github.com/gopxl/beep/v2/speaker"
) )
type PlaybackState int type PlaybackState int
@ -60,7 +60,7 @@ func (c *Controller) Play(song *subsonic.Child) {
} }
r, err := c.client.Stream(song.ID) r, err := c.client.Stream(song.ID)
if err != nil { if err != nil {
//TODO: Log error //TODO: Log error
c.Stop() c.Stop()
return return
} }