Update Watch logic for new API wrapper #13
2 changed files with 5 additions and 5 deletions
|
@ -18,7 +18,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
|
||||||
*
|
*
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
*
|
* Fix Watch page and progress bars for new API changes
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ var WatchPage = React.createClass({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
lbry.get({name: this.props.name}, (fileInfo) => {
|
lbry.get({name: this.props.name}).then((fileInfo) => {
|
||||||
this._outpoint = fileInfo.outpoint;
|
this._outpoint = fileInfo.outpoint;
|
||||||
this.updateLoadStatus();
|
this.updateLoadStatus();
|
||||||
});
|
});
|
||||||
|
@ -67,11 +67,11 @@ var WatchPage = React.createClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateLoadStatus: function() {
|
updateLoadStatus: function() {
|
||||||
api.file_list({
|
lbry.file_list({
|
||||||
outpoint: this._outpoint,
|
outpoint: this._outpoint,
|
||||||
full_status: true,
|
full_status: true,
|
||||||
}, ([status]) => {
|
}).then(([status]) => {
|
||||||
if (!status || !['running', 'stopped'].includes(status.code) || status.written_bytes == 0) {
|
if (!status || status.written_bytes == 0) {
|
||||||
// Download hasn't started yet, so update status message (if available) then try again
|
// 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
|
// TODO: Would be nice to check if we have the MOOV before starting playing
|
||||||
if (status) {
|
if (status) {
|
||||||
|
|
Loading…
Reference in a new issue