From d6c249aa8c7213ece1f710da3f2c8d8b94f81ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Thu, 13 Apr 2023 21:48:06 -0400 Subject: [PATCH] add debugging statements when playing This was requested in issue #112. --- player/player.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/player/player.go b/player/player.go index 36ecfde..56f7128 100644 --- a/player/player.go +++ b/player/player.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "log" "strconv" "github.com/dweymouth/go-mpv" @@ -156,6 +157,7 @@ func (p *Player) Init(maxCacheMB int) error { // Note that the Player API does not provide methods to read // the play queue. Clients are expected to maintain their own play queue model. func (p *Player) AppendFile(url string) error { + log.Printf("Adding playback URL: %s", url) if !p.initialized { return ErrUnitialized } @@ -164,6 +166,7 @@ func (p *Player) AppendFile(url string) error { // Plays the specified file, clearing the previous play queue, if any. func (p *Player) PlayFile(url string) error { + log.Printf("Adding playback URL: %s", url) if !p.initialized { return ErrUnitialized }