Make stream name display more robust (inc. fall back to URI)
This commit is contained in:
parent
00ade0a78b
commit
2824447c6c
1 changed files with 6 additions and 4 deletions
|
@ -46,7 +46,7 @@ var MyFilesRow = React.createClass({
|
||||||
return (
|
return (
|
||||||
<div className="row-fluid">
|
<div className="row-fluid">
|
||||||
<div className="span3">
|
<div className="span3">
|
||||||
<img src={this.props.imgUrl} style={searchRowImgStyle} alt={'Photo for ' + (this.props.title || this.props.name)} style={searchRowImgStyle} />
|
<img src={this.props.imgUrl} style={searchRowImgStyle} alt={'Photo for ' + this.props.title} style={searchRowImgStyle} />
|
||||||
</div>
|
</div>
|
||||||
<div className="span6">
|
<div className="span6">
|
||||||
<h2>{this.props.title}</h2>
|
<h2>{this.props.title}</h2>
|
||||||
|
@ -89,9 +89,11 @@ var MyFilesPage = React.createClass({
|
||||||
} else {
|
} else {
|
||||||
var content = [];
|
var content = [];
|
||||||
for (let {completed, written_bytes, total_bytes, lbry_uri, stopped, metadata} of this.state.filesInfo) {
|
for (let {completed, written_bytes, total_bytes, lbry_uri, stopped, metadata} of this.state.filesInfo) {
|
||||||
let {name, thumbnail} = metadata;
|
let {name, stream_name, thumbnail} = metadata;
|
||||||
content.push(<MyFilesRow lbryUri={lbry_uri} title={name} completed={completed} stopped={stopped}
|
var title = (name || stream_name || ('lbry://' + lbry_uri));
|
||||||
ratioLoaded={written_bytes / total_bytes} imgUrl={thumbnail}/>);
|
var ratioLoaded = written_bytes / total_bytes;
|
||||||
|
content.push(<MyFilesRow lbryUri={lbry_uri} title={title} completed={completed} stopped={stopped}
|
||||||
|
ratioLoaded={ratioLoaded} imgUrl={thumbnail}/>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue