discord_embed: Don't do url redirect for catbox links
continuous-integration/appveyor/branch AppVeyor build succeeded Details

master discord_embed_v1.0.12
Jonatan Nilsson 2022-12-01 10:16:24 +00:00
parent 203965027b
commit 260f2b6c7e
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ export default class ServeHandler extends Parent {
let res = await ctx.db.safeCallProc('discord_embed.link_get', [id - 3843])
if (res.first.length) {
videoLink = ctx.state.video = res.first[0].video_link
if (!ctx.state.video.startsWith('https://cdn.discordapp.com')) {
if (!ctx.state.video.startsWith('https://cdn.discordapp.com') && !ctx.state.video.includes('catbox.')) {
videoLink = this.frontend + '/video/' + ctx.url.slice(1) + '.webm'
}
imageLink = res.first[0].image_link

View File

@ -1,6 +1,6 @@
{
"name": "discord_embed",
"version": "1.0.11",
"version": "1.0.12",
"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.11</title>
<title>Discord Embedder from AV1 server 1.0.12</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ if (imageLink) { }}