From e8b8ccbce9381f194edd4a2076cc94a67c2cd615 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Tue, 12 Nov 2024 19:43:32 -0600 Subject: [PATCH] chore(player): Update deprecated function call --- internal/player/styles.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/player/styles.go b/internal/player/styles.go index 3b8bf62..e4d5dd2 100644 --- a/internal/player/styles.go +++ b/internal/player/styles.go @@ -1,6 +1,8 @@ package player import ( + "os" + "gabe565.com/ascii-movie/internal/movie" "github.com/charmbracelet/lipgloss" "github.com/muesli/termenv" @@ -22,13 +24,12 @@ func NewStyles(m *movie.Movie, renderer *lipgloss.Renderer) Styles { optionsColor := lipgloss.AdaptiveColor{Light: "7", Dark: "8"} selectedColor := lipgloss.AdaptiveColor{Light: "12", Dark: "4"} - isTTY := renderer.Output().TTY() != nil screenStyle := renderer.NewStyle(). Width(m.Width). Height(m.Height). Border(lipgloss.RoundedBorder()). BorderForeground(borderColor) - if isTTY { + if _, isTTY := renderer.Output().Writer().(*os.File); isTTY { screenStyle = screenStyle.Foreground(lipgloss.AdaptiveColor{Light: "0", Dark: "15"}) }