discord_embed: Fix so video urls that redirect will always work by generating redirect link ourselves
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded

This commit is contained in:
Jonatan Nilsson 2022-10-29 12:39:53 +00:00
parent 3e7e787002
commit 8badc915cd
3 changed files with 4 additions and 3 deletions

View file

@ -37,7 +37,8 @@ export default class ServeHandler extends Parent {
if (id) {
let res = await ctx.db.safeCallProc('discord_embed.link_get', [id - 3843])
if (res.first.length) {
videoLink = res.first[0].video_link
ctx.state.video = res.first[0].video_link
videoLink = this.frontend + '/video/' + ctx.url.slice(1) + '.webm'
imageLink = res.first[0].image_link
} else {
ctx.status = 404

View file

@ -1,6 +1,6 @@
{
"name": "discord_embed",
"version": "1.0.8",
"version": "1.0.9",
"port": 4120,
"description": "AV1 discord server embed helper",
"main": "index.js",

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Discord Embedder from AV1 server 1.0.8</title>
<title>Discord Embedder from AV1 server 1.0.9</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ if (imageLink) { }}