mirror of https://gitlab.com/bashrc2/epicyon
first post on timeline
parent
f86dffe420
commit
c81aac5247
32
daemon.py
32
daemon.py
|
@ -12120,6 +12120,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -12294,6 +12296,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -12457,6 +12461,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -12619,6 +12625,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -12778,6 +12786,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -12938,6 +12948,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -13103,6 +13115,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -13260,6 +13274,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -13356,6 +13372,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -13465,6 +13483,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -13623,6 +13643,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 0
|
page_number = 0
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -13768,6 +13790,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
page_number = 1
|
page_number = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
if ';' in page_number:
|
||||||
|
page_number = page_number.split(';')[0]
|
||||||
nickname = nickname.split('?page=')[0]
|
nickname = nickname.split('?page=')[0]
|
||||||
if len(page_number) > 5:
|
if len(page_number) > 5:
|
||||||
page_number = "1"
|
page_number = "1"
|
||||||
|
@ -13927,6 +13951,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
SHARES_PER_PAGE)
|
SHARES_PER_PAGE)
|
||||||
else:
|
else:
|
||||||
page_number_str = path.split('?page=')[1]
|
page_number_str = path.split('?page=')[1]
|
||||||
|
if ';' in page_number_str:
|
||||||
|
page_number_str = page_number_str.split(';')[0]
|
||||||
if '#' in page_number_str:
|
if '#' in page_number_str:
|
||||||
page_number_str = page_number_str.split('#')[0]
|
page_number_str = page_number_str.split('#')[0]
|
||||||
if len(page_number_str) > 5:
|
if len(page_number_str) > 5:
|
||||||
|
@ -14062,6 +14088,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
authorized, FOLLOWS_PER_PAGE)
|
authorized, FOLLOWS_PER_PAGE)
|
||||||
else:
|
else:
|
||||||
page_number_str = path.split('?page=')[1]
|
page_number_str = path.split('?page=')[1]
|
||||||
|
if ';' in page_number_str:
|
||||||
|
page_number_str = page_number_str.split(';')[0]
|
||||||
if '#' in page_number_str:
|
if '#' in page_number_str:
|
||||||
page_number_str = page_number_str.split('#')[0]
|
page_number_str = page_number_str.split('#')[0]
|
||||||
if len(page_number_str) > 5:
|
if len(page_number_str) > 5:
|
||||||
|
@ -14200,6 +14228,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'followers')
|
'followers')
|
||||||
else:
|
else:
|
||||||
page_number_str = path.split('?page=')[1]
|
page_number_str = path.split('?page=')[1]
|
||||||
|
if ';' in page_number_str:
|
||||||
|
page_number_str = page_number_str.split(';')[0]
|
||||||
if '#' in page_number_str:
|
if '#' in page_number_str:
|
||||||
page_number_str = page_number_str.split('#')[0]
|
page_number_str = page_number_str.split('#')[0]
|
||||||
if len(page_number_str) > 5:
|
if len(page_number_str) > 5:
|
||||||
|
@ -14578,6 +14608,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
nickname = nickname.split('?')[0]
|
nickname = nickname.split('?')[0]
|
||||||
if '?page=' in path:
|
if '?page=' in path:
|
||||||
page_number_str = path.split('?page=')[1]
|
page_number_str = path.split('?page=')[1]
|
||||||
|
if ';' in page_number_str:
|
||||||
|
page_number_str = page_number_str.split(';')[0]
|
||||||
if '?' in page_number_str:
|
if '?' in page_number_str:
|
||||||
page_number_str = page_number_str.split('?')[0]
|
page_number_str = page_number_str.split('?')[0]
|
||||||
if '#' in page_number_str:
|
if '#' in page_number_str:
|
||||||
|
|
|
@ -948,6 +948,8 @@ def html_timeline(default_timeline: str,
|
||||||
if box_name == 'inbox':
|
if box_name == 'inbox':
|
||||||
use_cache_only = True
|
use_cache_only = True
|
||||||
|
|
||||||
|
last_post_id = ''
|
||||||
|
|
||||||
if timeline_json:
|
if timeline_json:
|
||||||
# if this is the media timeline then add an extra gallery container
|
# if this is the media timeline then add an extra gallery container
|
||||||
if box_name == 'tlmedia':
|
if box_name == 'tlmedia':
|
||||||
|
@ -981,6 +983,7 @@ def html_timeline(default_timeline: str,
|
||||||
curr_tl_str,
|
curr_tl_str,
|
||||||
box_name,
|
box_name,
|
||||||
page_number)
|
page_number)
|
||||||
|
last_post_id = post_id
|
||||||
_log_timeline_timing(enable_timing_log,
|
_log_timeline_timing(enable_timing_log,
|
||||||
timeline_start_time,
|
timeline_start_time,
|
||||||
box_name, '10')
|
box_name, '10')
|
||||||
|
@ -1027,6 +1030,8 @@ def html_timeline(default_timeline: str,
|
||||||
|
|
||||||
if curr_tl_str:
|
if curr_tl_str:
|
||||||
if curr_tl_str not in tl_str:
|
if curr_tl_str not in tl_str:
|
||||||
|
last_post_id = \
|
||||||
|
remove_id_ending(item['id']).replace('/', '#')
|
||||||
item_ctr += 1
|
item_ctr += 1
|
||||||
tl_str += text_mode_separator + curr_tl_str
|
tl_str += text_mode_separator + curr_tl_str
|
||||||
if separator_str:
|
if separator_str:
|
||||||
|
@ -1041,11 +1046,14 @@ def html_timeline(default_timeline: str,
|
||||||
# page down arrow
|
# page down arrow
|
||||||
if item_ctr > 0:
|
if item_ctr > 0:
|
||||||
tl_str += text_mode_separator
|
tl_str += text_mode_separator
|
||||||
|
first_post = ''
|
||||||
|
if last_post_id:
|
||||||
|
first_post = ';firstpost=' + last_post_id
|
||||||
tl_str += \
|
tl_str += \
|
||||||
' <br>\n' + \
|
' <br>\n' + \
|
||||||
' <center>\n' + \
|
' <center>\n' + \
|
||||||
' <a href="' + users_path + '/' + box_name + '?page=' + \
|
' <a href="' + users_path + '/' + box_name + '?page=' + \
|
||||||
str(page_number + 1) + \
|
str(page_number + 1) + first_post + \
|
||||||
'#timelineposts" accesskey="' + access_keys['Page down'] + '" ' + \
|
'#timelineposts" accesskey="' + access_keys['Page down'] + '" ' + \
|
||||||
'class="imageAnchor" tabindex="9">' + \
|
'class="imageAnchor" tabindex="9">' + \
|
||||||
'<img loading="lazy" decoding="async" class="pageicon" src="/' + \
|
'<img loading="lazy" decoding="async" class="pageicon" src="/' + \
|
||||||
|
|
Loading…
Reference in New Issue