Plugin tweaks for ads and previews
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user