diff options
Diffstat (limited to 'src/js/plugins/previewThumbnails.js')
-rw-r--r-- | src/js/plugins/previewThumbnails.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/js/plugins/previewThumbnails.js b/src/js/plugins/previewThumbnails.js index 053875c7..57b9265f 100644 --- a/src/js/plugins/previewThumbnails.js +++ b/src/js/plugins/previewThumbnails.js @@ -301,11 +301,20 @@ class PreviewThumbnails { } // Find the desired thumbnail index + // TODO: Handle a video longer than the thumbs where thumbNum is null const thumbNum = this.thumbnails[0].frames.findIndex( frame => this.seekTime >= frame.startTime && this.seekTime <= frame.endTime, ); + const hasThumb = thumbNum >= 0; let qualityIndex = 0; + this.toggleThumbContainer(hasThumb); + + // No matching thumb found + if (!hasThumb) { + return; + } + // Check to see if we've already downloaded higher quality versions of this image this.thumbnails.forEach((thumbnail, index) => { if (this.loadedImages.includes(thumbnail.frames[thumbNum].text)) { |