From b41b56941ccdd3572a0f474020f016cc0c60c631 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 30 Nov 2018 08:50:49 +0100 Subject: [PATCH] use time based id --- recommendation_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recommendation_engine.py b/recommendation_engine.py index dfb1f9b..dc0cf33 100644 --- a/recommendation_engine.py +++ b/recommendation_engine.py @@ -463,7 +463,7 @@ class Engine: 'tags': storyline['tags'], 'clips': [{ 'item': clip['id'].split('/')[0], - 'id': clip['id'], + 'id': '%s_%0.3f-%0.3f' % (id.split('/')[0], data['in'], data['out']), 'in': clip['in'], 'out': clip['out'] } for clip in clips if clip['value'] == storyline['name']]