From a590c0ea2a4d631e1fa4015b41b2defc0812dacc Mon Sep 17 00:00:00 2001 From: pythagoraswitch Date: Sun, 12 Aug 2018 16:33:05 +0200 Subject: [PATCH] fix for the less than 16 getVideos output issue --- recommendation_engine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recommendation_engine.py b/recommendation_engine.py index cf8cbc0..4a8b075 100644 --- a/recommendation_engine.py +++ b/recommendation_engine.py @@ -9,6 +9,7 @@ import logging import os import random import time +import copy import ox @@ -188,7 +189,7 @@ class Engine: gridChange = {k: v.get('value', 0) for k, v in self.state['gridChange'].items()} # Exclude playlists from the most recent grid - playlists = self.playlists + playlists = copy.deepcopy(self.playlists) if len(vids_exclude) > 0: for playlist in playlists: if playlist["name"] in vids_exclude: