don't reuse playlists
This commit is contained in:
parent
691679eb78
commit
8e06af0e2e
1 changed files with 2 additions and 2 deletions
|
@ -96,13 +96,13 @@ class Engine:
|
|||
playlists = playlists[channels['userKeywords']:]
|
||||
# For each playlist, compute global keyword score
|
||||
score = {}
|
||||
for playlist in self.playlists:
|
||||
for playlist in playlists:
|
||||
score[playlist['name']] = random.random()
|
||||
for tag in [tag for tag in playlist['tags'] if tag in sliders]:
|
||||
score[playlist['name']] += sliders[tag]
|
||||
# Select highest scoring playlists
|
||||
playlists = sorted(
|
||||
self.playlists,
|
||||
playlists,
|
||||
key=lambda playlist: -score[playlist['name']]
|
||||
)
|
||||
videos += playlists[:channels['globalKeywords']]
|
||||
|
|
Loading…
Reference in a new issue