Merge branch 'mediaelement' of https://github.com/lbryio/lbry-web-ui into mediaelement

This commit is contained in:
Alex Liebowitz 2016-06-30 00:42:38 -04:00
commit 11f450bde0
2 changed files with 5 additions and 6 deletions

View file

@ -47,7 +47,7 @@ var SearchResults = React.createClass({
console.log('made it here');
this.props.results.forEach(function(result) {
rows.push(
<SearchResultRow name={result.name} title={result.stream_name} imgUrl={result.thumbnail}
<SearchResultRow name={result.name} title={result.title} imgUrl={result.thumbnail}
description={result.description} cost_est={result.cost_est} />
);
});
@ -149,7 +149,7 @@ var FeaturedContentItem = React.createClass({
lbry.resolveName(this.props.name, (metadata) => {
this.setState({
metadata: metadata,
title: metadata.name || metadata.stream_name || ('lbry://' + this.props.name),
title: metadata.title || ('lbry://' + this.props.name),
})
});
},

View file

@ -146,13 +146,12 @@ var MyFilesPage = React.createClass({
for (let fileInfo of this.state.filesInfo) {
let {completed, written_bytes, total_bytes, lbry_uri, file_name, download_path,
stopped, metadata} = fileInfo;
let {name, stream_name, thumbnail} = metadata;
let {title, thumbnail} = metadata;
var title = (name || stream_name || ('lbry://' + lbry_uri));
var ratioLoaded = written_bytes / total_bytes;
var showWatchButton = (lbry.getMediaType(file_name) == 'video');
content.push(<MyFilesRow lbryUri={lbry_uri} title={title} completed={completed} stopped={stopped}
content.push(<MyFilesRow lbryUri={lbry_uri} title={title || ('lbry://' + lbry_uri)} completed={completed} stopped={stopped}
ratioLoaded={ratioLoaded} imgUrl={thumbnail} path={download_path}
showWatchButton={showWatchButton}/>);
}
@ -170,4 +169,4 @@ var MyFilesPage = React.createClass({
</main>
);
}
});
});