Skip to content

Commit f9e7730

Browse files
authored
fix: events/impl.go and playplay/impl.go references missing package, breaking go mod tidy (#244)
* refactor: remove dummy event handling and implement new event manager structure * refactor: add dummy event manager * refactor and fix playplay package
1 parent db0414a commit f9e7730

File tree

6 files changed

+27
-43
lines changed

6 files changed

+27
-43
lines changed

events/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

events/impl.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build events
2-
31
package events
42

53
import (

events/dummy.go renamed to events/impl/impl.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
1-
//go:build !events
2-
3-
package events
1+
package impl
42

53
import (
64
librespot "github.com/devgianlu/go-librespot"
75
"github.com/devgianlu/go-librespot/audio"
8-
"github.com/devgianlu/go-librespot/events/plugin"
96
"github.com/devgianlu/go-librespot/mercury"
107
"github.com/devgianlu/go-librespot/player"
118
connectpb "github.com/devgianlu/go-librespot/proto/spotify/connectstate"
129
metadatapb "github.com/devgianlu/go-librespot/proto/spotify/metadata"
1310
"github.com/devgianlu/go-librespot/spclient"
1411
)
1512

16-
var Plugin plugin.Interface = dummyPlugin{}
17-
18-
type dummyPlugin struct {
13+
type Impl struct {
1914
}
2015

21-
func (p dummyPlugin) NewEventManager(librespot.Logger, *librespot.AppState, *mercury.Client, *spclient.Spclient, string) (player.EventManager, error) {
16+
func (p Impl) NewEventManager(librespot.Logger, *librespot.AppState, *mercury.Client, *spclient.Spclient, string) (player.EventManager, error) {
2217
return dummyEventManager{}, nil
2318
}
2419

playplay/dummy.go

Lines changed: 0 additions & 30 deletions
This file was deleted.

playplay/impl.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build playplay
2-
31
package playplay
42

53
import (

playplay/impl/impl.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package impl
2+
3+
import (
4+
"fmt"
5+
)
6+
7+
type Impl struct {
8+
}
9+
10+
func (p Impl) IsSupported() bool {
11+
return false
12+
}
13+
14+
func (p Impl) GetVersion() int32 {
15+
return 0
16+
}
17+
18+
func (p Impl) GetToken() []byte {
19+
return nil
20+
}
21+
22+
func (p Impl) Deobfuscate(_, _ []byte) ([]byte, error) {
23+
return nil, fmt.Errorf("playplay plugin not provided")
24+
}

0 commit comments

Comments
 (0)