diff --git a/s/item.tpl.html b/s/item.tpl.html index 66599cc..006d086 100644 --- a/s/item.tpl.html +++ b/s/item.tpl.html @@ -9,7 +9,7 @@ - +
diff --git a/src/websrv.js b/src/websrv.js index a0c5210..5ee8a5d 100644 --- a/src/websrv.js +++ b/src/websrv.js @@ -107,6 +107,7 @@ function Websrv(tlib) { userchannel: '', usernetwork: '', thumb: null, + thumbnail: null, next: null, prev: null }; @@ -125,8 +126,8 @@ function Websrv(tlib) { break; case "audio/mpeg": case "audio/ogg": - case "audio/flac": - case "audio/x-flac": + case "audio/flac": + case "audio/x-flac": data.item = 'audio'; break; } @@ -135,6 +136,7 @@ function Websrv(tlib) { data.srcurl = e.src; data.src = urlm.parse(e.src).hostname; data.thumb = (e.thumb != '' && e.thumb.match(/sndcdn\.com/i))?e.thumb:null; + data.thumbnail = `${lib.cfg.main.url}/t/${e.id}.png`; data.dest = e.dest; data.mime = e.mime; data.size = lib.formatSize(e.size); @@ -282,6 +284,7 @@ function Websrv(tlib) { size: e.size, userchannel: e.userchannel, usernetwork: e.usernetwork, + thumb: lib.cfg.main.url + "/t/" + e.id + ".png", next: null, prev: null }; @@ -306,6 +309,7 @@ function Websrv(tlib) { else { res.writeHead(403); res.end('403 - forbidden'); + console.log(req.connection.remoteAddress); } }).listen(lib.cfg.websrv.port); }