From ae6d3512e72b8fe223e29e5690cd9d1cab726eeb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 28 Nov 2019 20:00:48 +0000 Subject: [PATCH] Buttons on video and audio in media timeline --- webinterface.py | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/webinterface.py b/webinterface.py index c125137c..98fd639f 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2383,12 +2383,27 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \ galleryStr+=' ' galleryStr+=translate['Your browser does not support the video tag.'] galleryStr+=' \n' - galleryStr+=' \n\n' + galleryStr+=' \n' + if postJsonObject['object'].get('url'): + videoPostUrl=postJsonObject['object']['url'] + else: + videoPostUrl=postJsonObject['object']['id'] + if imageDescription: + galleryStr+='
'+imageDescription+'
\n' + else: + galleryStr+='
' + galleryStr+='
\n' + galleryStr+=' '+replyStr+announceStr+likeStr+bookmarkStr+deleteStr+'\n' + galleryStr+='
\n' + galleryStr+='
\n' + galleryStr+=' '+avatarLink+'\n' + galleryStr+='
\n' + galleryStr+='\n' - attachmentStr+='
' + attachmentStr+='
' attachmentCtr+=1 elif mediaType=='audio/mpeg' or \ mediaType=='audio/ogg': @@ -2405,7 +2420,22 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \ galleryStr+=' ' galleryStr+=translate['Your browser does not support the audio tag.'] galleryStr+=' \n' - galleryStr+=' \n\n' + galleryStr+=' \n' + if postJsonObject['object'].get('url'): + audioPostUrl=postJsonObject['object']['url'] + else: + audioPostUrl=postJsonObject['object']['id'] + if imageDescription: + galleryStr+='
'+imageDescription+'
\n' + else: + galleryStr+='
' + galleryStr+='
\n' + galleryStr+=' '+replyStr+announceStr+likeStr+bookmarkStr+deleteStr+'\n' + galleryStr+='
\n' + galleryStr+='
\n' + galleryStr+=' '+avatarLink+'\n' + galleryStr+='
\n' + galleryStr+='\n' attachmentStr+='