From ec6bd97e1ccf8be5e39239210ab26c1be53be7ec Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 1 Dec 2019 13:45:30 +0000 Subject: [PATCH] Mute button --- daemon.py | 66 ++++++++++++++++++++++++++++++++++++-- img/icons/hacker/mute.png | Bin 0 -> 1026 bytes img/icons/light/mute.png | Bin 0 -> 1026 bytes img/icons/mute.png | Bin 0 -> 1025 bytes img/icons/purple/mute.png | Bin 0 -> 1029 bytes posts.py | 46 ++++++++++++++++++++++++++ translations/ar.json | 4 ++- translations/ca.json | 4 ++- translations/cy.json | 4 ++- translations/de.json | 4 ++- translations/en.json | 4 ++- translations/es.json | 4 ++- translations/fr.json | 4 ++- translations/ga.json | 4 ++- translations/hi.json | 4 ++- translations/it.json | 4 ++- translations/ja.json | 4 ++- translations/oc.json | 4 ++- translations/pt.json | 4 ++- translations/ru.json | 4 ++- translations/zh.json | 4 ++- utils.py | 13 ++++++++ webinterface.py | 36 ++++++++++++++++----- 23 files changed, 195 insertions(+), 26 deletions(-) create mode 100644 img/icons/hacker/mute.png create mode 100644 img/icons/light/mute.png create mode 100644 img/icons/mute.png create mode 100644 img/icons/purple/mute.png diff --git a/daemon.py b/daemon.py index 7690f224..b5b20c4e 100644 --- a/daemon.py +++ b/daemon.py @@ -39,6 +39,7 @@ from person import removeAccount from person import canRemovePost from person import personSnooze from person import personUnsnooze +from posts import mutePost from posts import createQuestionPost from posts import outboxMessageCreateWrap from posts import savePostToBox @@ -2058,6 +2059,11 @@ class PubServer(BaseHTTPRequestHandler): deleteUrl=self.path.split('?delete=')[1] if '?' in deleteUrl: deleteUrl=deleteUrl.split('?')[0] + timelineStr=self.server.defaultTimeline + if '?tl=' in self.path: + timelineStr=self.path.split('?tl=')[1] + if '?' in timelineStr: + timelineStr=timelineStr.split('?')[0] actor= \ self.server.httpPrefix+'://'+ \ self.server.domainFull+self.path.split('?delete=')[0] @@ -2069,13 +2075,13 @@ class PubServer(BaseHTTPRequestHandler): if actor not in deleteUrl: # You can only delete your own posts self.server.GETbusy=False - self._redirect_headers(actor+'/'+self.server.defaultTimeline,cookie) + self._redirect_headers(actor+'/'+timelineStr,cookie) return self.postToNickname=getNicknameFromActor(actor) if not self.postToNickname: print('WARN: unable to find nickname in '+actor) self.server.GETbusy=False - self._redirect_headers(actor+'/'+self.server.defaultTimeline,cookie) + self._redirect_headers(actor+'/'+timelineStr,cookie) return if not self.server.session: self.server.session= \ @@ -2095,7 +2101,61 @@ class PubServer(BaseHTTPRequestHandler): self.server.GETbusy=False return self.server.GETbusy=False - self._redirect_headers(actor+'/'+self.server.defaultTimeline,cookie) + self._redirect_headers(actor+'/'+timelineStr,cookie) + return + + # mute a post from the web interface icon + if htmlGET and '?mute=' in self.path: + pageNumber=1 + if '?page=' in self.path: + pageNumberStr=self.path.split('?page=')[1] + if '?' in pageNumberStr: + pageNumberStr=pageNumberStr.split('?')[0] + if pageNumberStr.isdigit(): + pageNumber=int(pageNumberStr) + muteUrl=self.path.split('?mute=')[1] + if '?' in muteUrl: + muteUrl=muteUrl.split('?')[0] + timelineStr=self.server.defaultTimeline + if '?tl=' in self.path: + timelineStr=self.path.split('?tl=')[1] + if '?' in timelineStr: + timelineStr=timelineStr.split('?')[0] + actor= \ + self.server.httpPrefix+'://'+ \ + self.server.domainFull+self.path.split('?mute=')[0] + nickname=getNicknameFromActor(actor) + mutePost(self.server.baseDir,nickname,self.server.domain, \ + muteUrl,self.server.recentPostsCache) + self.server.GETbusy=False + self._redirect_headers(actor+'/'+timelineStr,cookie) + return + + # unmute a post from the web interface icon + if htmlGET and '?unmute=' in self.path: + pageNumber=1 + if '?page=' in self.path: + pageNumberStr=self.path.split('?page=')[1] + if '?' in pageNumberStr: + pageNumberStr=pageNumberStr.split('?')[0] + if pageNumberStr.isdigit(): + pageNumber=int(pageNumberStr) + muteUrl=self.path.split('?unmute=')[1] + if '?' in muteUrl: + muteUrl=muteUrl.split('?')[0] + timelineStr=self.server.defaultTimeline + if '?tl=' in self.path: + timelineStr=self.path.split('?tl=')[1] + if '?' in timelineStr: + timelineStr=timelineStr.split('?')[0] + actor= \ + self.server.httpPrefix+'://'+ \ + self.server.domainFull+self.path.split('?mute=')[0] + nickname=getNicknameFromActor(actor) + unmutePost(self.server.baseDir,nickname,self.server.domain, \ + muteUrl,self.server.recentPostsCache) + self.server.GETbusy=False + self._redirect_headers(actor+'/'+timelineStr,cookie) return # reply from the web interface icon diff --git a/img/icons/hacker/mute.png b/img/icons/hacker/mute.png new file mode 100644 index 0000000000000000000000000000000000000000..6969e74d39c6c9b8a797173aded7797efa00eada GIT binary patch literal 1026 zcmV+d1pWJoP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=HEu4E?+hTmC5mVj-H&2l&lQg)E#=ZE6f)VEve zRvz+Dpkgq_fIq{jF#h>_hQE-gNDN8MbICa(rIHF)G(6tYt)`fExl=kr=)cIreSjen z)NGVT6^J;oJ&iT#8dswgA z(0e}_oY58bgaZ#Di70)oBG`cxsVEsGdK^!iMNuZn-}^4yn{Up$x88gg>ygW=D?-di zA;03Ux6Aw1j%#CHsT#O614JEBilMQ%!5C@M2 zY63Ce_doU-PeEw4AKnpiTmY-Vo7s*5LA&u;EsycRBkCrnE&7K)crYQ>@zrYmMw zXw-V~C0Dxi%9mY!m8&*{PfJZ(Zq~e&Ry%j;xc)tN3*CF^bhyNgCxxW004?fL_t(2&%MyS z5yK!11z>R$Dj9)MG#VK#qcDPeX zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=KJavLEG$KN?ckFb&u635|VnduFB{QkjY9Xn}e z(&UBA%T7ZJK_BGbA%swD9aI|nx~x7fhXpexuD_4?YX__h^t;t+(YO;$ip?j z5DDIL>!x$-7s&NK!S)2IkMdw`+wpB^54;(a>6y{kdcF+_-{iFWA@6x5zT3|JjK*tN z>uu<{9}U6i3VXtVPa!!_`}87Mfn+JD88v!*>^4h8En=U?E?mv0;9ae!*d1ldri>>_+!7&fD%vOo&tpdsA;)SuH3coKe=agktz8 z+O|qYacr@HSO?9D(gI~-M0-%APK5@Y>)ohfiIGn>yqO!zlDQaXZVO7Bg$5h&^dJr% z4b%i;zScs^Z(jZyIXriQCKHTJiXTe&O!znDGBn0aU82LUSYcf}a~jK--(9Vpw_-6QAaEoSr9_7@ z8xi8@;8U=2q&im+AXV-Z2H1!sz;T|wF~?}>vhq!gs|6rbk{Hn700CBviu|$Y$f2U5 zF{o-%Q`f8|Ns38RN|xpwRZJ|JS~4@YY{kW+t0y;i&t5WT!4;-CWeeGJ&ZWRB|O6M*e$G@j;p?lB0oOB|U&UosXPCNa~XBo(~ zAtMeQY1r_QN4cnNs*lv@iQL!JXj7ZS;?lD_HHgjLOwhbebTR`mjs)U12_T_)GCQ1N z!6F>o!pn)g2r!g<3EuL6WzZc7bdz*?jyHPsP(eG zQDgy{r*Ovfkb#S>d13t38e8Pmo?lMieTToD_%ie|^fL4^^fL4^^fL4x8p4kU{O=fk z1OJne{`LU^!TIO%kMx;%W;gLDiu?jjMLHC*DSEx-#bPYW>R4s_3%^@G wSBKW~n1adC?_6HC*~_+{wCynPy5~QiFDfj8AA;P`BLDyZ07*qoM6N<$f|y>^7ytkO literal 0 HcmV?d00001 diff --git a/img/icons/mute.png b/img/icons/mute.png new file mode 100644 index 0000000000000000000000000000000000000000..2c36817c5836a924d0f9c995bde3e00649fc0b77 GIT binary patch literal 1025 zcmV+c1pfPpP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=KJavLEG$KN?ckFb&u635|VnduFB{QkjY9Xn}e z(&VyX7s&O#!1e;FkMdw`+wpB^PrMnF>6y{ldcF+_-{iE%A@6l1zB|tTjK*tP z>uu_J91X$f3VXtVPa!!_`}88%fn+JD88t?H>^_U2R^iWM7q0G8@UGrd?2fYK@)(M6 zq^*#iVzlL?pT}-R=>3l9?)hQDl?; zftoChQ^qwOLX`ZE9{GB)?gcx+^nGmAT)MN zb;Wm;@GftTcVGnsb%oh+z;e`^iK=wZEm@oedV0jLUuUwu4Io7Dt=J3+2pow-DbZof zMua#z_!R7%C2|D;QsquzfQ?839Ovm9YmAmIE8oPpS^z>Ni2)5>Ai#=Ikv|q4IaE|M z231XJ>YBAANik_k$D;B`_3x=$=-zWLC!I*8GoE^;(@sD0Sq5@# z$cRHn8a907Q7&qm>LWFJBKI{l+SDeoxb*B!4Pvu56Ev?AoypedP8DwO-aY ziY!3$Eu1kuWZ+_JUKoG1#ujEpU$*h;)IE^qF{OH}NQn`~przIux-fdcEbvVl2z*SY`VQzgs_7 vht~6$g2~bETwb=>%eJ4i?J)4V=Rcn>DlCE@g51#~00000NkvXXu0mjft2)j2 literal 0 HcmV?d00001 diff --git a/img/icons/purple/mute.png b/img/icons/purple/mute.png new file mode 100644 index 0000000000000000000000000000000000000000..d2626e8fcb3a4fed3f533a7db696b3056529cc8e GIT binary patch literal 1029 zcmV+g1p51lP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=K1k{clmhWDHzM`%e1iQ~{bs&a!IKR=jhk3EyA znp759xGD1xLIQniY={2q=LkRWP!Eafn4tkY%iemQ68*rJH8F=i8q5XJu^C6&$l7ro1FGIJV<^Ir zwnBP}(Uy~b9=jEx_dBAy=Z6W?%f-jojpk$Y+v!S7h*S#uP;WU_Mk|O3JvP3tyHna$ej%>b7fgF7vs!zL5Z`_U;~~O#KEJ2 znn29gUTFEv%U>mj=SI+Eg0V^QLkXV=|E64q#+a!~bodo3?2BhkV;hs)tf2)UG4Mb- z8l{|k${9~R(`l!l`79ObQ)AVds#UMKmc~sQUjLSwh2|}{(y1erdhFU$x9&anGLUOS zMjSfQu;C+*a#7nWCmg!3B+v@Ktl6mb~wez zliXx>L;#2d z9Y_EG010qNS#tmYE+YT{E+YYWr9XB6000McNliru;|u`|7Y@p4865xs0E$UOK~yNu zz0kc8!ypU=U~v>G8G%tW8W}C4FoJw(T==ZmMtaHNI-%h^ex*nBpV56z>d1i-r~wJI zfH_hi2Z}8{osU<0Y3|2{9pFxUVl4y9R-YGim&ZVBG$6a90-K|(4%T@EXK+i5rkCR{ z{C?Gg3Q_Y{7kuj!y?@e>TVlwNb

d|7N@a_j8YpTwcsi00000NkvXXu0mjfE$7n( literal 0 HcmV?d00001 diff --git a/posts.py b/posts.py index 921f2819..85a691b9 100644 --- a/posts.py +++ b/posts.py @@ -2635,3 +2635,49 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str,nickname: str,domain: if saveJson(postJsonObject,announceFilename): return postJsonObject return None + +def mutePost(baseDir: str,nickname: str,domain: str,postId: str, \ + recentPostsCache: {}) -> None: + """ Mutes the given post + """ + postFilename=locatePost(baseDir,nickname,domain,postId) + if not postFilename: + return + postJsonObject=loadJson(postFilename) + if not postJsonObject: + return + + muteFile=open(postFilename+'.muted', "w") + muteFile.write('\n') + muteFile.close() + + # remove cached posts so that the muted version gets created + cachedPostFilename= \ + getCachedPostFilename(baseDir,nickname,postJsonObject) + if cachedPostFilename: + if os.path.isfile(cachedPostFilename): + os.remove(cachedPostFilename) + removePostFromCache(postJsonObject,recentPostsCache) + +def unmutePost(baseDir: str,nickname: str,domain: str,postId: str, \ + recentPostsCache: {}) -> None: + """ Unmutes the given post + """ + postFilename=locatePost(baseDir,nickname,domain,postId) + if not postFilename: + return + postJsonObject=loadJson(postFilename) + if not postJsonObject: + return + + muteFilename=postFilename+'.muted' + if os.path.isfile(muteFilename): + os.remove(muteFilename) + + # remove cached posts so that it gets recreated + cachedPostFilename= \ + getCachedPostFilename(baseDir,nickname,postJsonObject) + if cachedPostFilename: + if os.path.isfile(cachedPostFilename): + os.remove(cachedPostFilename) + removePostFromCache(postJsonObject,recentPostsCache) diff --git a/translations/ar.json b/translations/ar.json index 65cf2a99..08694325 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -198,5 +198,7 @@ "Previous month": "الشهر الماضى", "Next month": "الشهر القادم", "Get the source code": "الحصول على شفرة المصدر", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/ca.json b/translations/ca.json index e363d3ee..ae52e43a 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -198,5 +198,7 @@ "Previous month": "Mes anterior", "Next month": "El mes que ve", "Get the source code": "Obteniu el codi font", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/cy.json b/translations/cy.json index ea572c6b..97598567 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -198,5 +198,7 @@ "Previous month": "Y mis blaenorol", "Next month": "Mis nesaf", "Get the source code": "Sicrhewch y cod ffynhonnell", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/de.json b/translations/de.json index 189eac6c..b0973426 100644 --- a/translations/de.json +++ b/translations/de.json @@ -198,5 +198,7 @@ "Previous month": "Vorheriger Monat", "Next month": "Nächsten Monat", "Get the source code": "Holen Sie sich den Quellcode", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/en.json b/translations/en.json index 970c3bf4..7b73e5cb 100644 --- a/translations/en.json +++ b/translations/en.json @@ -198,5 +198,7 @@ "Previous month": "Previous month", "Next month": "Next month", "Get the source code": "Get the source code", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/es.json b/translations/es.json index f78f9a5a..cb597a50 100644 --- a/translations/es.json +++ b/translations/es.json @@ -198,5 +198,7 @@ "Previous month": "Mes anterior", "Next month": "Próximo mes", "Get the source code": "Obtén el código fuente", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/fr.json b/translations/fr.json index 8f8c87fe..65f1fc7a 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -198,5 +198,7 @@ "Previous month": "Le mois précédent", "Next month": "Le mois prochain", "Get the source code": "Obtenir le code source", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/ga.json b/translations/ga.json index 5b4097c6..ef2741f1 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -198,5 +198,7 @@ "Previous month": "An mhí roimhe seo", "Next month": "An mhí seo chugainn", "Get the source code": "Faigh an cód foinse", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/hi.json b/translations/hi.json index 61686e78..87cc706d 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -198,5 +198,7 @@ "Previous month": "पिछ्ला महिना", "Next month": "अगले महीने", "Get the source code": "स्रोत कोड प्राप्त करें", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/it.json b/translations/it.json index 2700c361..e06eae2f 100644 --- a/translations/it.json +++ b/translations/it.json @@ -198,5 +198,7 @@ "Previous month": "Il mese scorso", "Next month": "Il prossimo mese", "Get the source code": "Ottieni il codice sorgente", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/ja.json b/translations/ja.json index 6c88672c..7b17bc03 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -198,5 +198,7 @@ "Previous month": "前月", "Next month": "来月", "Get the source code": "ソースコードを入手する", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/oc.json b/translations/oc.json index fcd5ffac..9e05e4d3 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -194,5 +194,7 @@ "Previous month": "Previous month", "Next month": "Next month", "Get the source code": "Get the source code", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/pt.json b/translations/pt.json index 04091833..4fbb58ce 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -198,5 +198,7 @@ "Previous month": "Mês anterior", "Next month": "Próximo mês", "Get the source code": "Obter o código fonte", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/ru.json b/translations/ru.json index 04e981e4..325ca68c 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -198,5 +198,7 @@ "Previous month": "Предыдущий месяц", "Next month": "В следующем месяце", "Get the source code": "Получить исходный код", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/translations/zh.json b/translations/zh.json index c0d02963..4bd94c05 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -198,5 +198,7 @@ "Previous month": "前一个月", "Next month": "下个月", "Get the source code": "获取源代码", - "This is a media instance": "This is a media instance" + "This is a media instance": "This is a media instance", + "Mute this post": "Mute this post", + "Undo mute": "Undo mute" } diff --git a/utils.py b/utils.py index e925aff4..e7327c47 100644 --- a/utils.py +++ b/utils.py @@ -312,6 +312,19 @@ def deletePost(baseDir: str,httpPrefix: str,nickname: str,domain: str,postFilena # remove any attachment removeAttachment(baseDir,httpPrefix,domain,postJsonObject) + # remove any mute file + muteFilename=postFilename+'.muted' + if os.path.isfile(muteFilename): + os.remove(muteFilename) + + # remove cached html version of the post + cachedPostFilename= \ + getCachedPostFilename(baseDir,nickname,postJsonObject) + if cachedPostFilename: + if os.path.isfile(cachedPostFilename): + os.remove(cachedPostFilename) + #removePostFromCache(postJsonObject,recentPostsCache) + hasObject=False if postJsonObject.get('object'): hasObject=True diff --git a/webinterface.py b/webinterface.py index 2c9907d0..a6ebe5c1 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1995,6 +1995,18 @@ def preparePostFromHtmlCache(postHtml: str,boxName: str,pageNumber: int) -> str: postHtml=postHtml.replace('?tl=inbox','?tl=tlbookmarks') return postHtml.replace(';-999;',';'+str(pageNumber)+';').replace('?page=-999','?page='+str(pageNumber)) +def postIsMuted(baseDir: str,nickname: str,domain: str, messageId: str) -> bool: + """ Returns true if the given post is muted + """ + postDir=baseDir+'/accounts/'+nickname+'@'+domain + muteFilename=postDir+'/inbox/'+messageId.replace('/','#')+'.json.muted' + if os.path.isfile(muteFilename): + return True + muteFilename=postDir+'/outbox/'+messageId.replace('/','#')+'.json.muted' + if os.path.isfile(muteFilename): + return True + return False + def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \ iconsDir: str,translate: {}, \ pageNumber: int,baseDir: str, \ @@ -2238,14 +2250,24 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \ '?tl='+boxName+'" title="'+bookmarkTitle+'">' bookmarkStr+=''+bookmarkTitle+' |' + isMuted=postIsMuted(baseDir,nickname,domain,messageId) + deleteStr='' + muteStr='' if allowDeletion or \ ('/'+fullDomain+'/' in postActor and \ postJsonObject['object']['id'].startswith(postActor)): if '/users/'+nickname+'/' in postJsonObject['object']['id']: deleteStr='' deleteStr+=''+translate['Delete this post']+'' - + else: + if not isMuted: + muteStr='' + muteStr+=''+translate['Mute this post']+'' + else: + muteStr='' + muteStr+=''+translate['Undo mute']+'' + replyAvatarImageInPost='' if showRepeatIcon: if isAnnounced: @@ -2468,7 +2490,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \ if showIcons: footerStr='

' - footerStr+=replyStr+announceStr+likeStr+bookmarkStr+deleteStr + footerStr+=replyStr+announceStr+likeStr+bookmarkStr+deleteStr+muteStr footerStr+=''+publishedStr+'' footerStr+='
' @@ -2503,12 +2525,10 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \ if postJsonObject['object'].get('tag'): contentStr=replaceEmojiFromTags(contentStr,postJsonObject['object']['tag'],'content') - # replace 's - contentStr=contentStr.replace("\ufffd\ufffd\ufffds","'s") - - contentStrMedia=contentStr - - contentStr='
'+contentStr+'
' + if isMuted: + contentStr='' + else: + contentStr='
'+contentStr+'
' postHtml='' if boxName!='tlmedia':