Mute media

merge-requests/30/head
Bob Mottram 2019-12-03 09:40:11 +00:00
parent 316d135dbf
commit 66b2d3b364
1 changed files with 21 additions and 18 deletions

View File

@ -2374,6 +2374,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
attachmentStr+='<br>'
if boxName=='tlmedia':
galleryStr+='<div class="gallery">\n'
if not isMuted:
galleryStr+=' <a href="'+attach['url']+'">\n'
galleryStr+=' <img loading="lazy" src="'+attach['url']+'" alt="" title="">\n'
galleryStr+=' </a>\n'
@ -2381,7 +2382,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
imagePostUrl=postJsonObject['object']['url']
else:
imagePostUrl=postJsonObject['object']['id']
if imageDescription:
if imageDescription and not isMuted:
galleryStr+=' <a href="'+imagePostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n'
else:
galleryStr+='<label class="transparent">---</label><br>'
@ -2409,6 +2410,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
attachmentStr+='<br>'
if boxName=='tlmedia':
galleryStr+='<div class="gallery">\n'
if not isMuted:
galleryStr+=' <a href="'+attach['url']+'">\n'
galleryStr+=' <video width="600" height="400" controls>\n'
galleryStr+=' <source src="'+attach['url']+'" alt="'+imageDescription+'" title="'+imageDescription+'" class="attachment" type="video/'+extension.replace('.','')+'">'
@ -2419,7 +2421,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
videoPostUrl=postJsonObject['object']['url']
else:
videoPostUrl=postJsonObject['object']['id']
if imageDescription:
if imageDescription and not isMuted:
galleryStr+=' <a href="'+videoPostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n'
else:
galleryStr+='<label class="transparent">---</label><br>'
@ -2446,6 +2448,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
attachmentStr+='<br>'
if boxName=='tlmedia':
galleryStr+='<div class="gallery">\n'
if not isMuted:
galleryStr+=' <a href="'+attach['url']+'">\n'
galleryStr+=' <audio controls>\n'
galleryStr+=' <source src="'+attach['url']+'" alt="'+imageDescription+'" title="'+imageDescription+'" class="attachment" type="audio/'+extension.replace('.','')+'">'
@ -2456,7 +2459,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
audioPostUrl=postJsonObject['object']['url']
else:
audioPostUrl=postJsonObject['object']['id']
if imageDescription:
if imageDescription and not isMuted:
galleryStr+=' <a href="'+audioPostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n'
else:
galleryStr+='<label class="transparent">---</label><br>'