Skip to content

Commit

Permalink
puddle of mudd fix
Browse files Browse the repository at this point in the history
  • Loading branch information
th0rn0 committed Sep 27, 2024
1 parent 4ba4333 commit 6039bad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ func getNextSongByVotesExcludeURI(excludeUri spotify.URI) (Track, error) {

func getNextButtRockSong() (Track, error) {
var track Track
if err := db.Raw("SELECT * FROM tracks WHERE (artist == 'Creed' OR artist == 'Nickelback' OR artist 'Puddle Of Mudd') ORDER BY random()").First(&track).Error; err != nil {
if err := db.Raw("SELECT * FROM tracks WHERE (artist == 'Creed' OR artist == 'Nickelback' OR artist == 'Puddle Of Mudd') ORDER BY random()").First(&track).Error; err != nil {
return track, err
}
return track, nil
}

func getNextButtRockSongExcludeURI(excludeUri spotify.URI) (Track, error) {
var track Track
if err := db.Raw("SELECT * FROM tracks WHERE (artist == 'Creed' OR artist == 'Nickelback' OR artist 'Puddle Of Mudd') AND uri != ? ORDER BY random()", excludeUri).First(&track).Error; err != nil {
if err := db.Raw("SELECT * FROM tracks WHERE (artist == 'Creed' OR artist == 'Nickelback' OR artist == 'Puddle Of Mudd') AND uri != ? ORDER BY random()", excludeUri).First(&track).Error; err != nil {
return track, err
}
return track, nil
Expand Down

0 comments on commit 6039bad

Please sign in to comment.