Skip to content

Commit

Permalink
Merge pull request #169 from mattwright324/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mattwright324 committed Sep 17, 2023
2 parents 3075c4a + d5d09cd commit a3f05c7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions js/youtube-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -1352,12 +1352,14 @@
const thumbsDiv = $("#thumbnails");

thumbsDiv.empty();
for (let i = 0; i < 4; i++) {
const thumbUrl = "https://img.youtube.com/vi/" + id + "/" + i + ".jpg";
const names = ["0", "hq1", "hq2", "hq3"]
for (let i in names) {
const name = names[i]
const thumbUrl = "https://img.youtube.com/vi/" + id + "/" + name + ".jpg";
const html =
"<div class='column' style='margin-bottom: 1.5%!important;'>" +
"<a href='https://lens.google.com/uploadbyurl?url=" + thumbUrl + "' target='_blank'>" +
"<img id='video-thumb-" + i + "' src='" + thumbUrl + "' alt='Thumb " + i + "' style='max-width: 200px;'>" +
"<img id='video-thumb-" + name + "' src='" + thumbUrl + "' alt='Thumb " + name + "' style='max-width: 200px;'>" +
"<p>Click to reverse image search</p>" +
"</a>" +
"</div>";
Expand Down Expand Up @@ -1717,11 +1719,12 @@
console.log("Creating video.json...");
zip.file("video.json", JSON.stringify(exportData.video, null, 4));

thumbLinks["video-thumb.png"] = document.getElementById('video-thumb').src;
thumbLinks["video-thumb1.png"] = document.getElementById('video-thumb-0').src;
thumbLinks["video-thumb2.png"] = document.getElementById('video-thumb-1').src;
thumbLinks["video-thumb3.png"] = document.getElementById('video-thumb-2').src;
thumbLinks["video-thumb4.png"] = document.getElementById('video-thumb-3').src;
const names = ["0", "hq1", "hq2", "hq3"]
for (let i in names) {
const name = names[i];

thumbLinks[`video-thumb-${name}.png`] = document.getElementById(`video-thumb-${name}`).src;
}
}

if (exportData.hasOwnProperty("playlist")) {
Expand Down

0 comments on commit a3f05c7

Please sign in to comment.