Refactor pt. 1: move MPV player to own package and extract some types

This commit is contained in:
Drew Weymouth
2023-12-17 13:50:30 -08:00
parent a16e687c02
commit 55f9461410
11 changed files with 760 additions and 711 deletions
+3 -2
View File
@@ -8,6 +8,7 @@ import (
"github.com/dweymouth/supersonic/backend"
"github.com/dweymouth/supersonic/backend/mediaprovider"
"github.com/dweymouth/supersonic/player"
"github.com/dweymouth/supersonic/player/mpv"
"github.com/dweymouth/supersonic/sharedutil"
"github.com/dweymouth/supersonic/ui/controller"
"github.com/dweymouth/supersonic/ui/layouts"
@@ -41,7 +42,7 @@ type nowPlayingPageState struct {
pool *util.WidgetPool
conf *backend.NowPlayingPageConfig
pm *backend.PlaybackManager
p *player.Player
p *mpv.Player
canRate bool
}
@@ -51,7 +52,7 @@ func NewNowPlayingPage(
pool *util.WidgetPool,
conf *backend.NowPlayingPageConfig,
pm *backend.PlaybackManager,
p *player.Player, // TODO: once other player backends are supported (eg uPnP), refactor
p *mpv.Player, // TODO: once other player backends are supported (eg uPnP), refactor
canRate bool,
) *NowPlayingPage {
a := &NowPlayingPage{nowPlayingPageState: nowPlayingPageState{