soundcloudthumbnail in itempage

This commit is contained in:
Flummi 2016-09-13 14:12:36 +02:00
parent c3656a06dd
commit 5ad62b5c5d
3 changed files with 8 additions and 1 deletions

View File

@ -8,6 +8,11 @@
<body> <body>
<div class="id">[ID: {{ id }} | by: {{ username }}]</div> <div class="id">[ID: {{ id }} | by: {{ username }}]</div>
<div class="return"><a href="/" title="return to main">f0ck.me</a></div><br /> <div class="return"><a href="/" title="return to main">f0ck.me</a></div><br />
{% if thumb != null %}
<div class="thumbnail">
<img src="{{ thumb }}" />
</div>
{% endif %}
<div class="medium"> <div class="medium">
{% if item == "video" %} {% if item == "video" %}
<video src="{{ dest }}" style="max-width: 1024px" preload="auto" autoplay controls loop></video> <video src="{{ dest }}" style="max-width: 1024px" preload="auto" autoplay controls loop></video>

View File

@ -51,7 +51,7 @@ a:hover {
color: #74c100; color: #74c100;
} }
.medium { .medium, .thumbnail {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -106,6 +106,7 @@ function Websrv(tbot, tsql, tlib) {
size: '', size: '',
userchannel: '', userchannel: '',
usernetwork: '', usernetwork: '',
thumb: null,
next: null, next: null,
prev: null prev: null
}; };
@ -131,6 +132,7 @@ function Websrv(tbot, tsql, tlib) {
data.srcurl = e.src; data.srcurl = e.src;
data.src = urlm.parse(e.src).hostname; data.src = urlm.parse(e.src).hostname;
data.thumb = (e.thumb != '' && e.thumb.match(/sndcdn\.com/i))?e.thumb:null;
data.dest = e.dest; data.dest = e.dest;
data.mime = e.mime; data.mime = e.mime;