From 2ae32cc2f09b75631173daa75590d59c0ff40f4d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 10 Apr 2015 23:27:34 +0200 Subject: [PATCH] fix starting new download --- static/js/fs.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/fs.js b/static/js/fs.js index 748e49d46..4d5bb177e 100644 --- a/static/js/fs.js +++ b/static/js/fs.js @@ -179,10 +179,14 @@ pandora.fs = (function() { url = '/' + pandora.getVideoURLName(id, resolution, part, track), blobSize = 5*1024*1024, total; Ox.Log('FS', 'start downloading', url); - that.fs.root.getFile(partialName, {create: true}, function(fileEntry) { + that.fs.root.getFile(partialName, {create: false}, function(fileEntry) { fileEntry.getMetadata(function(meta) { + Ox.Log('FS', 'resume from', meta.size); partialDownload(meta.size); }); + }, function() { + Ox.Log('FS', 'new download'); + partialDownload(0); }); function partialDownload(offset) { var end = offset + blobSize;