diff --git a/html/videos.html b/html/videos.html
index 5f1d90e..e90e048 100644
--- a/html/videos.html
+++ b/html/videos.html
@@ -5,7 +5,7 @@
Name |
- Length |
+ Icon |
Watch |
@@ -13,7 +13,7 @@
{for video in videos}
{video.name} |
- {video.length} |
+ |
View
|
diff --git a/server.js b/server.js
index 5270c79..d304fe2 100644
--- a/server.js
+++ b/server.js
@@ -105,14 +105,14 @@ function getVideosTemplateInformation(templateContext, request)
{
var splitArray = file.split('/');
var name = splitArray[splitArray.length -1];
-
- if (!fs.existsSync('img/private/' + name + ".png"))
+ const icon = 'img/private/' + name + ".png";
+ if (!fs.existsSync(icon))
{
- filepreview.generate(file, 'img/private/' + name + ".png", function(error) {
+ filepreview.generate(file, icon, function(error) {
if (error) {
return console.log(error);
}
- console.log('File preview is located ' + 'img/private/' + file + ".png");
+ console.log('File preview is located ' + icon);
});
}
videos.push({name: file.replace(rootDir, ''), length: "n/a"});