some log cleanup

This commit is contained in:
Drew Weymouth
2026-02-08 17:46:20 -08:00
parent 52f96e1ce8
commit f2440d9d15
2 changed files with 5 additions and 8 deletions
+5 -6
View File
@@ -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
}
-2
View File
@@ -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