From f2440d9d156442c941eeac64fea582e38d04f501 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Sun, 8 Feb 2026 17:46:20 -0800 Subject: [PATCH] some log cleanup --- backend/autoeq.go | 11 +++++------ ui/dialogs/autoeqbrowser.go | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/backend/autoeq.go b/backend/autoeq.go index b0e04c6..76a0bb2 100644 --- a/backend/autoeq.go +++ b/backend/autoeq.go @@ -24,10 +24,10 @@ import ( ) const ( - autoEQIndexURL = "https://raw.githubusercontent.com/jaakkopasanen/AutoEq/master/results/INDEX.md" - autoEQBaseURL = "https://raw.githubusercontent.com/jaakkopasanen/AutoEq/master/results/" - indexCacheTTL = 7 * 24 * time.Hour // 7 days - profileCacheTTL = 30 * 24 * time.Hour // 30 days + autoEQIndexURL = "https://raw.githubusercontent.com/jaakkopasanen/AutoEq/master/results/INDEX.md" + autoEQBaseURL = "https://raw.githubusercontent.com/jaakkopasanen/AutoEq/master/results/" + indexCacheTTL = 7 * 24 * time.Hour // 7 days + profileCacheTTL = 30 * 24 * time.Hour // 30 days maxMemoryCacheSize = 20 // LRU cache size ) @@ -114,6 +114,7 @@ func (m *AutoEQManager) FetchIndex(ctx context.Context) ([]AutoEQProfileMetadata if err != nil { return nil, err } + log.Printf("Successfully fetched %d AutoEQ profiles", len(profiles)) // Cache in memory and disk m.indexCacheMutex.Lock() @@ -359,7 +360,6 @@ func (m *AutoEQManager) fetchProfileFromNetwork(ctx context.Context, path string // The file is named "{HeadphoneName} FixedBandEQ.txt" encodedFileName := url.PathEscape(headphoneName + " FixedBandEQ.txt") profileURL := autoEQBaseURL + encodedPath + "/" + encodedFileName - log.Printf("Fetching profile from: %s", profileURL) ctx, cancel := context.WithTimeout(ctx, m.timeout) defer cancel() @@ -375,7 +375,6 @@ func (m *AutoEQManager) fetchProfileFromNetwork(ctx context.Context, path string } defer resp.Body.Close() - log.Printf("Profile fetch response: %d", resp.StatusCode) if resp.StatusCode == http.StatusNotFound { return nil, ErrProfileNotFound } diff --git a/ui/dialogs/autoeqbrowser.go b/ui/dialogs/autoeqbrowser.go index a023622..bc828c8 100644 --- a/ui/dialogs/autoeqbrowser.go +++ b/ui/dialogs/autoeqbrowser.go @@ -50,8 +50,6 @@ func (ab *AutoEQBrowser) fetchAllProfiles() error { return fmt.Errorf("failed to fetch AutoEQ index: %w", err) } - log.Printf("Successfully fetched %d AutoEQ profiles", len(profiles)) - // Convert to SearchResult format for display ab.allProfileResults = sharedutil.MapSlice(profiles, ab.profileToSearchResult) return nil