diff --git a/dist/index.html b/dist/index.html index ce99f828c..cbd6e497e 100644 --- a/dist/index.html +++ b/dist/index.html @@ -26,6 +26,7 @@ + diff --git a/js/lbry.js b/js/lbry.js index 9b87b8883..a1cd5bc82 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -110,7 +110,7 @@ lbry.sendToAddress = function(amount, address, callback, errorCallback) lbry.search = function(query, callback) { - lbry.call("search_nametrie", { "search": query }, callback); + lbry.lighthouse.call('search', [query], callback); } lbry.resolveName = function(name, callback) { diff --git a/js/lighthouse.js b/js/lighthouse.js new file mode 100644 index 000000000..e72322486 --- /dev/null +++ b/js/lighthouse.js @@ -0,0 +1,14 @@ +lbry.lighthouse = { + servers: [ + 'http://lighthouse1.lbry.io:50005', + 'http://lighthouse2.lbry.io:50005', + 'http://lighthouse3.lbry.io:50005', + ], + path: '/', + + call: function(method, params, callback, errorCallback, connectFailedCallback) { + lbry.jsonrpc_call(this.server + this.path, method, params, callback, errorCallback, connectFailedCallback); + }, +}; + +lbry.lighthouse.server = lbry.lighthouse.servers[Math.round(Math.random() * (lbry.lighthouse.servers.length - 1))]; diff --git a/js/page/discover.js b/js/page/discover.js index d0d7b4421..84c42179d 100644 --- a/js/page/discover.js +++ b/js/page/discover.js @@ -37,10 +37,10 @@ var SearchResults = React.createClass({ render: function() { var rows = []; this.props.results.forEach(function(result) { - if (!result.nsfw) { + if (!result.value.nsfw) { rows.push( - + ); } }); @@ -91,7 +91,7 @@ var SearchResultRow = React.createClass({
- +
lbry://{this.props.name}

{this.props.title}

@@ -142,7 +142,7 @@ var FeaturedContentItem = React.createClass({ return null; } return ; + description={this.state.metadata.description} cost={this.state.amount} />; } });