Fix playing videos that have been previously downloaded but then deleted/moved

This commit is contained in:
6ea86b96 2017-05-23 11:48:36 +04:00
parent e55ba15613
commit 1b9d23279c
No known key found for this signature in database
GPG key ID: B282D183E4931E8F

View file

@ -223,8 +223,11 @@ export function doPurchaseUri(uri) {
// the blobs. Or perhaps there's another way to see if a file was already // the blobs. Or perhaps there's another way to see if a file was already
// purchased? // purchased?
// we already fully downloaded the file // we already fully downloaded the file. If completed is true but
if (fileInfo && fileInfo.completed) { // writtenBytes is false then we downloaded it before but deleted it again,
// which means it needs to be reconstructed from the blobs by dispatching
// doLoadVideo.
if (fileInfo && fileInfo.completed && !!fileInfo.writtenBytes) {
return Promise.resolve() return Promise.resolve()
} }