refactor: use track terminology instead of song

This commit is contained in:
Mathis Maquenne
2026-07-30 12:53:03 +02:00
parent 90b7bb25f0
commit 1fbbd60106
19 changed files with 230 additions and 230 deletions
+3 -3
View File
@@ -26,12 +26,12 @@ var (
)
func FetchBPM(ctx context.Context, httpClient *http.Client, artist, title, duration string) (BPMKey, error) {
songURL, err := findSongURL(ctx, httpClient, artist, title, duration)
trackURL, err := findTrackURL(ctx, httpClient, artist, title, duration)
if err != nil {
return BPMKey{}, err
}
html, err := fetchBPMPage(ctx, httpClient, songURL)
html, err := fetchBPMPage(ctx, httpClient, trackURL)
if err != nil {
return BPMKey{}, err
}
@@ -39,7 +39,7 @@ func FetchBPM(ctx context.Context, httpClient *http.Client, artist, title, durat
return parseBPM(html)
}
func findSongURL(ctx context.Context, httpClient *http.Client, artist, title, duration string) (string, error) {
func findTrackURL(ctx context.Context, httpClient *http.Client, artist, title, duration string) (string, error) {
const rootURL = "https://songbpm.com"
values := neturl.Values{}