Skip to content

Commit

Permalink
Merge pull request #17 from HansBambel/Use-songs-from-playlist-instea…
Browse files Browse the repository at this point in the history
…d-of-recommendations

Use songs from the given playlist instead of getting recommendations
  • Loading branch information
HansBambel authored Jan 1, 2025
2 parents e578760 + 1d8e5ab commit 921af4d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/game_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ def _fill_upcoming_songs(self):
else:
self.recommendations_based_on = get_songs_from_saved_playlist()

upcoming_recommended_songs_raw = get_recommendations(
self.recommendations_based_on, min_popularity=self.min_popularity
)
upcoming_recommended_songs_raw = [song["track"] for song in self.recommendations_based_on]
new_recommendations = [from_recommendation_to_spotify_song(song) for song in upcoming_recommended_songs_raw]
logger.debug(f"Found {len(new_recommendations)} new recommendations.")
self.upcoming_recommended_songs = [song for song in new_recommendations if song not in self.past_songs]
Expand Down

0 comments on commit 921af4d

Please sign in to comment.