Update Watch logic for new API wrapper

Also was using some keys that are no longer available from file_list -
fixed that
This commit is contained in:
Alex Liebowitz 2017-03-14 12:30:54 -04:00
parent 5a0dc0b5c2
commit a2af284ccf
2 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
*
### Fixed
*
* Fix Watch page and progress bars for new API changes
*
*

View file

@ -27,7 +27,7 @@ var WatchPage = React.createClass({
};
},
componentDidMount: function() {
lbry.get({name: this.props.name}, (fileInfo) => {
lbry.get({name: this.props.name}).then((fileInfo) => {
this._outpoint = fileInfo.outpoint;
this.updateLoadStatus();
});
@ -67,11 +67,11 @@ var WatchPage = React.createClass({
}
},
updateLoadStatus: function() {
api.file_list({
lbry.file_list({
outpoint: this._outpoint,
full_status: true,
}, ([status]) => {
if (!status || !['running', 'stopped'].includes(status.code) || status.written_bytes == 0) {
}).then(([status]) => {
if (!status || status.written_bytes == 0) {
// Download hasn't started yet, so update status message (if available) then try again
// TODO: Would be nice to check if we have the MOOV before starting playing
if (status) {