From 03b6804a9e1981e0c8721e335c7af5c7518b998b Mon Sep 17 00:00:00 2001 From: Stu Date: Sat, 13 Dec 2025 21:58:41 -0500 Subject: [PATCH] Fix build: remove unused imports, drop playSess img refs, cleanup state init --- main.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/main.go b/main.go index b5c83d8..0e8ee2b 100644 --- a/main.go +++ b/main.go @@ -4,15 +4,12 @@ import ( "bufio" "bytes" "context" - "encoding/binary" "encoding/json" "errors" "flag" "fmt" - "image" "image/color" "image/png" - "io" "math" "net/url" "os" @@ -42,7 +39,6 @@ import ( "git.leaktechnologies.dev/stu/VT_Player/internal/queue" "git.leaktechnologies.dev/stu/VT_Player/internal/ui" "git.leaktechnologies.dev/stu/VT_Player/internal/utils" - "github.com/hajimehoshi/oto" ) // Module describes a high level tool surface that gets a tile on the menu. @@ -2034,7 +2030,6 @@ func runGUI() { a.Settings().SetTheme(&ui.MonoTheme{}) logging.Debug(logging.CatUI, "created fyne app: %#v", a) w := a.NewWindow("VT Player") - state.window = w if icon := utils.LoadAppIcon(); icon != nil { a.SetIcon(icon) w.SetIcon(icon) @@ -3948,21 +3943,6 @@ func (s *appState) showFrameManual(path string, img *canvas.Image) { } func (s *appState) captureCoverFromCurrent() (string, error) { - // If we have a play session active, capture the current playing frame - if s.playSess != nil && s.playSess.img != nil && s.playSess.img.Image != nil { - dest := filepath.Join(os.TempDir(), fmt.Sprintf("videotools-cover-%d.png", time.Now().UnixNano())) - f, err := os.Create(dest) - if err != nil { - return "", err - } - defer f.Close() - if err := png.Encode(f, s.playSess.img.Image); err != nil { - return "", err - } - return dest, nil - } - - // Otherwise use the current preview frame if s.currentFrame == "" { return "", fmt.Errorf("no frame available") }