mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' of gitlab.com:bashrc2/epicyon
commit
22a5a30160
12
daemon.py
12
daemon.py
|
@ -1524,10 +1524,14 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.outbox_thread_index[account_outbox_thread_name] = index
|
||||
|
||||
# remove any existing thread from the current index in the buffer
|
||||
if self.server.outboxThread.get(account_outbox_thread_name):
|
||||
acct = account_outbox_thread_name
|
||||
if self.server.outboxThread[acct][index].is_alive():
|
||||
self.server.outboxThread[acct][index].kill()
|
||||
acct = account_outbox_thread_name
|
||||
if self.server.outboxThread.get(acct):
|
||||
if len(self.server.outboxThread[acct]) > index:
|
||||
try:
|
||||
if self.server.outboxThread[acct][index].is_alive():
|
||||
self.server.outboxThread[acct][index].kill()
|
||||
except BaseException:
|
||||
pass
|
||||
return index
|
||||
|
||||
def _post_to_outbox_thread(self, message_json: {}) -> bool:
|
||||
|
|
|
@ -176,8 +176,13 @@ def _add_embedded_video_from_sites(translate: {}, content: str,
|
|||
if '/c/' in url:
|
||||
# don't try to embed peertube channel page
|
||||
continue
|
||||
url = url.replace('/w/', '/embed/')
|
||||
if '/w/' in url:
|
||||
if '/videos/' not in url:
|
||||
url = url.replace('/w/', '/videos/embed/')
|
||||
else:
|
||||
url = url.replace('/w/', '/embed/')
|
||||
url = url.replace('/watch/', '/embed/')
|
||||
|
||||
content += \
|
||||
"<center>\n<iframe loading=\"lazy\" " + \
|
||||
"sandbox=\"allow-same-origin " + \
|
||||
|
|
Loading…
Reference in New Issue