Skip to content

Commit

Permalink
Merge pull request #23 from marcus-crane/support-dupes
Browse files Browse the repository at this point in the history
Add support for albums that share the same name
  • Loading branch information
marcus-crane authored May 22, 2022
2 parents 3a57919 + 00ab5b2 commit a858e64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/lint.yml

This file was deleted.

4 changes: 2 additions & 2 deletions pkg/scrape/scrape.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ func GetResultsForLetter(letter string) (types.SearchResults, bool, error) {
s.Find("td a").Each(func(i int, t *goquery.Selection) {
if i == 1 {
title := strings.TrimSpace(t.Text())
results[title] = "#"
trackUrl, exists := t.Attr("href")
if exists {
results[title] = trackUrl
jointKey := fmt.Sprintf("%s (%s)", title, strings.ReplaceAll(trackUrl, "/game-soundtracks/album/", ""))
results[jointKey] = trackUrl
}
}
})
Expand Down

0 comments on commit a858e64

Please sign in to comment.