Compare commits
2 Commits
main
...
fix/headle
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6a1200d82 | ||
|
|
c53dccaea1 |
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Fix headless cookie detection by checking the default cookie path without explicit config (`#9`, thanks @RonanCodes)
|
||||
|
||||
## 0.3.0 - 2026-03-08
|
||||
|
||||
- Release prep: bump CLI/spec version to `0.3.0`
|
||||
|
||||
@ -164,9 +164,19 @@ func (c *Context) SetSpotify(client spotify.API) {
|
||||
}
|
||||
|
||||
func (c *Context) cookieSource() (cookies.Source, error) {
|
||||
// Use explicit cookie path from config if set
|
||||
if c.Profile.CookiePath != "" {
|
||||
return cookies.FileSource{Path: c.Profile.CookiePath}, nil
|
||||
}
|
||||
// Check if cookies exist at the default path (supports headless servers
|
||||
// where cookies were copied manually without running auth import)
|
||||
defaultPath := c.ResolveCookiePath()
|
||||
if defaultPath != "" {
|
||||
if _, err := os.Stat(defaultPath); err == nil {
|
||||
return cookies.FileSource{Path: defaultPath}, nil
|
||||
}
|
||||
}
|
||||
// Fall back to reading from browser
|
||||
browser := c.Profile.Browser
|
||||
if strings.TrimSpace(browser) == "" {
|
||||
browser = "chrome"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user