mirror of https://gitlab.com/bashrc2/epicyon
Maximum preview posts
parent
9142041f67
commit
c334db95c7
8
posts.py
8
posts.py
|
@ -5979,9 +5979,9 @@ def get_max_profile_posts(base_dir: str, nickname: str, domain: str,
|
|||
"""
|
||||
max_posts_filename = \
|
||||
acct_dir(base_dir, nickname, domain) + '/max_profile_posts.txt'
|
||||
max_profile_posts = 4
|
||||
if not os.path.isfile(max_posts_filename):
|
||||
return max_recent_posts
|
||||
max_profile_posts = max_recent_posts
|
||||
return max_profile_posts
|
||||
try:
|
||||
with open(max_posts_filename, 'r', encoding='utf-8') as fp_posts:
|
||||
max_posts_str = fp_posts.read()
|
||||
|
@ -5993,8 +5993,8 @@ def get_max_profile_posts(base_dir: str, nickname: str, domain: str,
|
|||
max_posts_filename)
|
||||
if max_profile_posts < 1:
|
||||
max_profile_posts = 1
|
||||
if max_profile_posts > 20:
|
||||
max_profile_posts = 20
|
||||
if max_profile_posts > max_recent_posts:
|
||||
max_profile_posts = max_recent_posts
|
||||
return max_profile_posts
|
||||
|
||||
|
||||
|
|
|
@ -1073,7 +1073,7 @@ def html_profile(signing_priv_key_pem: str,
|
|||
|
||||
if selected == 'posts':
|
||||
max_profile_posts = get_max_profile_posts(base_dir, nickname, domain,
|
||||
max_recent_posts)
|
||||
20)
|
||||
min_images_for_accounts = []
|
||||
profile_str += \
|
||||
_html_profile_posts(recent_posts_cache, max_profile_posts,
|
||||
|
|
Loading…
Reference in New Issue