Seed Support #56

Closed
ocnios wants to merge 173 commits from master into build
2 changed files with 21 additions and 8 deletions
Showing only changes of commit 3ac31df63f - Show all commits

View file

@ -22,6 +22,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
### Changed
* Update process now easier and more reliable
* Updated search to be compatible with new Lighthouse servers
* Cleaned up shutdown logic
* Support lbry v0.10 API signatures

View file

@ -1,8 +1,9 @@
import React from 'react';
import lbry from '../lbry.js';
import lbryio from '../lbryio.js';
import uri from '../uri.js';
import lighthouse from '../lighthouse.js';
import {FileTile} from '../component/file-tile.js';
import {FileTile, FileTileStream} from '../component/file-tile.js';
import {Link} from '../component/link.js';
import {ToolTip} from '../component/tooltip.js';
import {BusyMessage} from '../component/common.js';
@ -45,14 +46,25 @@ var SearchResults = React.createClass({
render: function() {
var rows = [],
seenNames = {}; //fix this when the search API returns claim IDs
this.props.results.forEach(function({name, value}) {
if (!seenNames[name]) {
seenNames[name] = name;
rows.push(
<FileTile key={name} uri={name} sdHash={value.sources.lbry_sd_hash} />
);
for (let {name, claim, claim_id, channel_name, channel_id, txid, nout} of this.props.results) {
let lbryUri;
if (channel_name) {
lbryUri = uri.buildLbryUri({
name: channel_name,
path: name,
claimId: channel_id,
});
} else {
lbryUri = uri.buildLbryUri({
name: name,
claimId: claim_id,
})
}
});
rows.push(
<FileTileStream key={name} uri={lbryUri} outpoint={txid + ':' + nout} metadata={claim.stream.metadata} contentType={claim.stream.source.contentType} />
);
}
return (
<div>{rows}</div>
);