og:thumb gefixt
This commit is contained in:
parent
a5a98dcab1
commit
c7bdf67436
@ -9,7 +9,7 @@
|
||||
<link rel="icon" type="image/gif" href="./s/favicon.gif" />
|
||||
|
||||
<meta name="Description" content="f0cked by {{ username }}" />
|
||||
<meta property="og:image" content="{{ thumb }}" />
|
||||
<meta property="og:image" content="{{ thumbnail }}" />
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user