use channel and keyword values

This commit is contained in:
Your Name 2018-02-05 14:25:46 +00:00
parent 86f0efcb19
commit 9e41a778f2

View file

@ -78,8 +78,8 @@ class Engine:
return clips return clips
def get_videos(self, user): def get_videos(self, user):
channels = self.state['channels'] channels = {k: v.get('value', 0) for k, v in self.state['channels'].items()}
sliders = self.state['keywords'] sliders = {k: v.get('value', 0) for k, v in self.state['keywords'].items()}
# For each playlist, compute keyword score # For each playlist, compute keyword score
score = {} score = {}
for playlist in self.playlists: for playlist in self.playlists: