copy mpris implementation from infinitime library to itd, where it really belongs
moved dbus.go to an internal utils package added context function parameter to initMusicCtrl and updated main.go to pass it updated calls.go, maps.go, music.go, and notifs.go to use utils package for getting a dus connection
This commit is contained in:
5
maps.go
5
maps.go
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/godbus/dbus/v5"
|
||||
"github.com/rs/zerolog/log"
|
||||
"go.arsenm.dev/infinitime"
|
||||
"go.arsenm.dev/itd/internal/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -19,7 +20,7 @@ const (
|
||||
|
||||
func initPureMaps(ctx context.Context, dev *infinitime.Device) error {
|
||||
// Connect to session bus. This connection is for method calls.
|
||||
conn, err := newSessionBusConn(ctx)
|
||||
conn, err := utils.NewSessionBusConn(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -30,7 +31,7 @@ func initPureMaps(ctx context.Context, dev *infinitime.Device) error {
|
||||
}
|
||||
|
||||
// Connect to session bus. This connection is for method calls.
|
||||
monitorConn, err := newSessionBusConn(ctx)
|
||||
monitorConn, err := utils.NewSessionBusConn(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user