Revert "Fix text trimming w/ old limits"

This reverts commit 9d9c32b79728aece09fd1fa44625f23ee2b8cb92.
This commit is contained in:
Dylan 2023-05-05 13:56:45 +01:00
parent 9d9c32b797
commit c6840ad093

View File

@ -453,7 +453,7 @@ def embed(video_link, vnf, image):
image = embedVNF['images'][image]
template = 'image.html'
elif qrt['type'] == "Video" or qrt['type'] == "":
urlDesc = urllib.parse.quote(desc)
urlDesc = urllib.parse.quote(textwrap.shorten(desc, width=220, placeholder="..."))
template = 'video.html'
if vnf['type'] == "Image":
@ -466,11 +466,11 @@ def embed(video_link, vnf, image):
if vnf['isGif'] == True and config['config']['gifConvertAPI'] != "" and config['config']['gifConvertAPI'] != "none":
vnf['url'] = f"{config['config']['gifConvertAPI']}/convert.mp4?url={vnf['url']}"
appNamePost = " - GIF"
urlDesc = urllib.parse.quote(desc)
urlDesc = urllib.parse.quote(textwrap.shorten(desc, width=220, placeholder="..."))
template = 'video.html'
if vnf['type'] == "":
urlDesc = urllib.parse.quote(desc)
urlDesc = urllib.parse.quote(textwrap.shorten(desc, width=220, placeholder="..."))
template = 'video.html'
color = "#7FFFD4" # Green