diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/assets/player/peertube-chunk-store.ts | 8 | ||||
-rw-r--r-- | client/src/assets/player/peertube-player-local-storage.ts | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-chunk-store.ts b/client/src/assets/player/peertube-chunk-store.ts index e14e31c04..767e46821 100644 --- a/client/src/assets/player/peertube-chunk-store.ts +++ b/client/src/assets/player/peertube-chunk-store.ts | |||
@@ -118,7 +118,13 @@ export class PeertubeChunkStore extends EventEmitter { | |||
118 | 118 | ||
119 | // IndexDB could be slow, use our memory index first | 119 | // IndexDB could be slow, use our memory index first |
120 | const memoryChunk = this.memoryChunks[index] | 120 | const memoryChunk = this.memoryChunks[index] |
121 | if (memoryChunk === undefined) return cb(null, new Buffer(0)) | 121 | if (memoryChunk === undefined) { |
122 | const err = new Error('Chunk not found') | ||
123 | err['notFound'] = true | ||
124 | |||
125 | return process.nextTick(() => cb(err)) | ||
126 | } | ||
127 | |||
122 | // Chunk in memory | 128 | // Chunk in memory |
123 | if (memoryChunk !== true) return cb(null, memoryChunk) | 129 | if (memoryChunk !== true) return cb(null, memoryChunk) |
124 | 130 | ||
diff --git a/client/src/assets/player/peertube-player-local-storage.ts b/client/src/assets/player/peertube-player-local-storage.ts index 6882f68a6..dac54c5a4 100644 --- a/client/src/assets/player/peertube-player-local-storage.ts +++ b/client/src/assets/player/peertube-player-local-storage.ts | |||
@@ -52,7 +52,6 @@ function getAverageBandwidthInStore () { | |||
52 | return undefined | 52 | return undefined |
53 | } | 53 | } |
54 | 54 | ||
55 | |||
56 | // --------------------------------------------------------------------------- | 55 | // --------------------------------------------------------------------------- |
57 | 56 | ||
58 | export { | 57 | export { |