Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use songs from the given playlist instead of getting recommendations #17

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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