fixed the login empty item issue
This commit is contained in:
parent
d31e0912e6
commit
8d75ad8c0a
1 changed files with 5 additions and 1 deletions
|
@ -85,6 +85,10 @@ class Engine:
|
||||||
return clips
|
return clips
|
||||||
|
|
||||||
def get_videos(self, user):
|
def get_videos(self, user):
|
||||||
|
|
||||||
|
if user.get('events', [])[0].get("event")=="login":
|
||||||
|
return self.get_recommendations(user)
|
||||||
|
|
||||||
channels = {k: v.get('value', 0) for k, v in self.state['channels'].items()}
|
channels = {k: v.get('value', 0) for k, v in self.state['channels'].items()}
|
||||||
sliders = {k: v.get('value', 0) for k, v in self.state['globalKeywords'].items()}
|
sliders = {k: v.get('value', 0) for k, v in self.state['globalKeywords'].items()}
|
||||||
grid_change = {k: v.get('value', 0) for k, v in self.state['gridChange'].items()}
|
grid_change = {k: v.get('value', 0) for k, v in self.state['gridChange'].items()}
|
||||||
|
@ -116,7 +120,7 @@ class Engine:
|
||||||
|
|
||||||
# if there were no grid events for all, initialize all grids.
|
# if there were no grid events for all, initialize all grids.
|
||||||
if len(prev_grid_list) < video_num:
|
if len(prev_grid_list) < video_num:
|
||||||
return self.get_recommendations(user)
|
return self.get_recommendations(user)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if play_index is None:
|
if play_index is None:
|
||||||
|
|
Loading…
Reference in a new issue