diff --git a/recommendation_engine.py b/recommendation_engine.py index dc0cf33..db47155 100644 --- a/recommendation_engine.py +++ b/recommendation_engine.py @@ -279,9 +279,9 @@ class Engine: ) # Record the following for debug view input top_user_playlists = [{ - 'name': playlist['name'], - 'tags': playlist['tags'] - 'score': score[playlist['name']] + 'name': playlist['name'], + 'tags': playlist['tags'], + 'score': score[playlist['name']], } for playlist in playlists[:channels['userKeywords']]] videos = playlists[:channels['userKeywords']] @@ -299,9 +299,9 @@ class Engine: ) # Record the following for debug view input top_global_playlists = [{ - 'name': playlist['name'], - 'tags': playlist['tags'] - 'score': score[playlist['name']] + 'name': playlist['name'], + 'tags': playlist['tags'], + 'score': score[playlist['name']], } for playlist in playlists[:channels['globalKeywords']]] videos += playlists[:16 - channels['userKeywords']] @@ -463,7 +463,7 @@ class Engine: 'tags': storyline['tags'], 'clips': [{ 'item': clip['id'].split('/')[0], - 'id': '%s_%0.3f-%0.3f' % (id.split('/')[0], data['in'], data['out']), + 'id': '%s_%0.3f-%0.3f' % (clip['id'].split('/')[0], clip['in'], clip['out']), 'in': clip['in'], 'out': clip['out'] } for clip in clips if clip['value'] == storyline['name']]