mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
d03aeba532
commit
d3e343c231
|
@ -354,9 +354,7 @@ def receive_search_query(self, calling_domain: str, cookie: str,
|
|||
if search_str.endswith(';remote'):
|
||||
search_str = search_str.replace(';remote', '')
|
||||
remote_only = True
|
||||
if search_str.endswith(':') or \
|
||||
search_str.endswith(';') or \
|
||||
search_str.endswith('.'):
|
||||
if string_ends_with(search_str, (':', ';', '.')):
|
||||
actor_str = \
|
||||
get_instance_url(calling_domain, http_prefix,
|
||||
domain_full, onion_domain,
|
||||
|
|
6
theme.py
6
theme.py
|
@ -8,6 +8,7 @@ __status__ = "Production"
|
|||
__module_group__ = "Web Interface"
|
||||
|
||||
import os
|
||||
from utils import string_ends_with
|
||||
from utils import is_account_dir
|
||||
from utils import load_json
|
||||
from utils import save_json
|
||||
|
@ -653,10 +654,7 @@ def _set_theme_fonts(base_dir: str, theme_name: str) -> None:
|
|||
return
|
||||
for _, _, files in os.walk(theme_fonts_dir):
|
||||
for filename in files:
|
||||
if filename.endswith('.woff2') or \
|
||||
filename.endswith('.woff') or \
|
||||
filename.endswith('.ttf') or \
|
||||
filename.endswith('.otf'):
|
||||
if string_ends_with(filename, ('.woff2', '.woff', '.ttf', '.otf')):
|
||||
dest_filename = fonts_dir + '/' + filename
|
||||
if os.path.isfile(dest_filename):
|
||||
# font already exists in the destination location
|
||||
|
|
|
@ -8,6 +8,7 @@ __status__ = "Production"
|
|||
__module_group__ = "Timeline"
|
||||
|
||||
import os
|
||||
from utils import string_ends_with
|
||||
from utils import valid_url_prefix
|
||||
|
||||
|
||||
|
@ -250,12 +251,10 @@ def _add_embedded_video_from_sites(content: str,
|
|||
url = url.split('"')[0]
|
||||
if not url:
|
||||
continue
|
||||
if url.endswith('/trending') or \
|
||||
url.endswith('/home') or \
|
||||
url.endswith('/overview') or \
|
||||
url.endswith('/recently-added') or \
|
||||
url.endswith('/local') or \
|
||||
url.endswith('/about'):
|
||||
possible_endings = (
|
||||
'/trending', '/home', '/overview',
|
||||
'/recently-added', '/local', '/about')
|
||||
if string_ends_with(url, possible_endings):
|
||||
# ignore various peertube endpoints
|
||||
continue
|
||||
if '/c/' in url or '/m/' in url:
|
||||
|
|
Loading…
Reference in New Issue