expose getNext, remove debug
This commit is contained in:
parent
5212e46563
commit
691679eb78
2 changed files with 1 additions and 2 deletions
|
@ -78,7 +78,6 @@ class Engine:
|
||||||
return clips
|
return clips
|
||||||
|
|
||||||
def get_videos(self, user):
|
def get_videos(self, user):
|
||||||
user = kwargs['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()}
|
||||||
# For each playlist, compute user keyword score
|
# For each playlist, compute user keyword score
|
||||||
|
|
|
@ -59,7 +59,7 @@ class RPCHandler(tornado.web.RequestHandler):
|
||||||
request = None
|
request = None
|
||||||
try:
|
try:
|
||||||
request = json.loads(self.request.body.decode())
|
request = json.loads(self.request.body.decode())
|
||||||
if request['method'] not in ('getVideos', 'getRecommendations', 'setRecommendations'):
|
if request['method'] not in ('getVideos', 'getNext', 'getRecommendations', 'setRecommendations'):
|
||||||
raise Exception('unknown method')
|
raise Exception('unknown method')
|
||||||
except:
|
except:
|
||||||
error = {'error': {'code': -32700, 'message': 'Parse error'}}
|
error = {'error': {'code': -32700, 'message': 'Parse error'}}
|
||||||
|
|
Loading…
Reference in a new issue