don't show newest if current video is newest. same for oldest

This commit is contained in:
jkhsjdhjs 2016-08-17 23:32:21 +02:00
parent 96fb99d16b
commit 8f876d97e5
2 changed files with 3 additions and 3 deletions

View File

@ -266,9 +266,9 @@ http.createServer((req, res) => {
data.next = rows[1][0].id;
if(rows[2].length)
data.prev = rows[2][0].id;
if(rows[3].length)
if(rows[3].length && data.id != rows[3][0].id)
data.first = rows[3][0].id;
if(rows[4].length)
if(rows[4].length && data.id != rows[4][0].id)
data.last = rows[4][0].id;
}
res.writeHead(200, { 'Content-Type': 'text/html' });