Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #15 from metabrainz/add-feedback
Browse files Browse the repository at this point in the history
Remove hated tracks from periodic jams
  • Loading branch information
mayhem authored Jan 10, 2024
2 parents fb7b82d + d0cd0f5 commit 9a84c61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lb_content_resolver/troi/patches/periodic_jams.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ def create(self, inputs):
latest_filter = troi.filters.LatestListenedAtFilterElement(DAYS_OF_RECENT_LISTENS_TO_EXCLUDE)
latest_filter.set_sources(recent_listens_lookup)

feedback_lookup = troi.listenbrainz.feedback.ListensFeedbackLookup(user_name, auth_token=inputs.get("token"))
feedback_lookup.set_sources(latest_filter)

recs_lookup = troi.musicbrainz.recording_lookup.RecordingLookupElement()
recs_lookup.set_sources(latest_filter)
recs_lookup.set_sources(feedback_lookup)

resolve = RecordingResolverElement(.8, target)
resolve.set_sources(recs_lookup)
Expand Down

0 comments on commit 9a84c61

Please sign in to comment.