fix resource needed for watch

This commit is contained in:
Job Evers-Meltzer 2017-01-17 19:26:09 -06:00
parent 1aa7981ab1
commit 78b0f923f4

View file

@ -84,7 +84,7 @@ class HostedEncryptedFile(resource.Resource):
if self.is_valid_request_name(request): if self.is_valid_request_name(request):
name = request.args['name'][0] name = request.args['name'][0]
d = self._api.jsonrpc_get({'name': name}) d = self._api.jsonrpc_get({'name': name})
d.addCallback(lambda response: response['result']['stream_hash']) d.addCallback(lambda response: response['stream_hash'])
d.addCallback(lambda sd_hash: self._api._get_lbry_file_by_sd_hash(sd_hash)) d.addCallback(lambda sd_hash: self._api._get_lbry_file_by_sd_hash(sd_hash))
d.addCallback(lambda lbry_file: self._make_stream_producer(request, lbry_file)) d.addCallback(lambda lbry_file: self._make_stream_producer(request, lbry_file))
elif request.args['name'][0] in self._api.waiting_on.keys(): elif request.args['name'][0] in self._api.waiting_on.keys():