mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
6c0b11aef5
commit
52ab97b03b
|
@ -1349,7 +1349,10 @@ def daemon_http_get(self) -> None:
|
|||
proxy_type,
|
||||
getreq_start_time,
|
||||
self.server.debug,
|
||||
curr_session, MAX_POSTS_IN_RSS_FEED)
|
||||
curr_session, MAX_POSTS_IN_RSS_FEED,
|
||||
self.server.translate,
|
||||
self.server.system_language,
|
||||
self.server.fitness)
|
||||
else:
|
||||
get_rss2site(self, calling_domain, self.path,
|
||||
self.server.base_dir,
|
||||
|
@ -1360,7 +1363,9 @@ def daemon_http_get(self) -> None:
|
|||
self.server.translate,
|
||||
getreq_start_time,
|
||||
self.server.debug,
|
||||
curr_session, MAX_POSTS_IN_RSS_FEED)
|
||||
curr_session, MAX_POSTS_IN_RSS_FEED,
|
||||
self.server.system_language,
|
||||
self.server.fitness)
|
||||
return
|
||||
|
||||
fitness_performance(getreq_start_time, self.server.fitness,
|
||||
|
@ -1379,7 +1384,8 @@ def daemon_http_get(self) -> None:
|
|||
getreq_start_time,
|
||||
self.server.debug,
|
||||
self.server.system_language,
|
||||
curr_session, MAX_POSTS_IN_RSS_FEED)
|
||||
curr_session, MAX_POSTS_IN_RSS_FEED,
|
||||
self.server.fitness)
|
||||
return
|
||||
|
||||
users_in_path = False
|
||||
|
@ -1669,7 +1675,11 @@ def daemon_http_get(self) -> None:
|
|||
proxy_type,
|
||||
cookie, self.server.translate,
|
||||
self.server.debug,
|
||||
curr_session, MAX_POSTS_IN_BLOGS_FEED):
|
||||
curr_session, MAX_POSTS_IN_BLOGS_FEED,
|
||||
self.server.peertube_instances,
|
||||
self.server.system_language,
|
||||
self.server.person_cache,
|
||||
self.server.fitness):
|
||||
return
|
||||
|
||||
fitness_performance(getreq_start_time, self.server.fitness,
|
||||
|
|
|
@ -23,7 +23,11 @@ def show_blog_page(self, authorized: bool,
|
|||
proxy_type: str, cookie: str,
|
||||
translate: {}, debug: str,
|
||||
curr_session,
|
||||
max_posts_in_blogs_feed: int) -> bool:
|
||||
max_posts_in_blogs_feed: int,
|
||||
peertube_instances: [],
|
||||
system_language: str,
|
||||
person_cache: {},
|
||||
fitness: {}) -> bool:
|
||||
"""Shows a blog page
|
||||
"""
|
||||
page_number = 1
|
||||
|
@ -64,9 +68,9 @@ def show_blog_page(self, authorized: bool,
|
|||
nickname,
|
||||
domain, port,
|
||||
max_posts_in_blogs_feed, page_number,
|
||||
self.server.peertube_instances,
|
||||
self.server.system_language,
|
||||
self.server.person_cache,
|
||||
peertube_instances,
|
||||
system_language,
|
||||
person_cache,
|
||||
debug)
|
||||
if msg is not None:
|
||||
msg = msg.encode('utf-8')
|
||||
|
@ -75,7 +79,7 @@ def show_blog_page(self, authorized: bool,
|
|||
cookie, calling_domain, False)
|
||||
write2(self, msg)
|
||||
fitness_performance(getreq_start_time,
|
||||
self.server.fitness,
|
||||
fitness,
|
||||
'_GET', 'show_blog_page',
|
||||
debug)
|
||||
return True
|
||||
|
|
|
@ -26,7 +26,10 @@ def get_rss2feed(self, calling_domain: str, path: str,
|
|||
domain: str, port: int, proxy_type: str,
|
||||
getreq_start_time, debug: bool,
|
||||
curr_session,
|
||||
max_posts_in_rss_feed: int) -> None:
|
||||
max_posts_in_rss_feed: int,
|
||||
translate: {},
|
||||
system_language: str,
|
||||
fitness: {}) -> None:
|
||||
"""Returns an RSS2 feed for the blog
|
||||
"""
|
||||
nickname = path.split('/blog/')[1]
|
||||
|
@ -46,13 +49,13 @@ def get_rss2feed(self, calling_domain: str, path: str,
|
|||
msg = \
|
||||
html_blog_page_rss2(base_dir,
|
||||
http_prefix,
|
||||
self.server.translate,
|
||||
translate,
|
||||
nickname,
|
||||
domain,
|
||||
port,
|
||||
max_posts_in_rss_feed, 1,
|
||||
True,
|
||||
self.server.system_language)
|
||||
system_language)
|
||||
if msg is not None:
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -62,7 +65,7 @@ def get_rss2feed(self, calling_domain: str, path: str,
|
|||
if debug:
|
||||
print('Sent rss2 feed: ' +
|
||||
path + ' ' + calling_domain)
|
||||
fitness_performance(getreq_start_time, self.server.fitness,
|
||||
fitness_performance(getreq_start_time, fitness,
|
||||
'_GET', '_get_rss2feed',
|
||||
debug)
|
||||
return
|
||||
|
@ -79,7 +82,9 @@ def get_rss2site(self, calling_domain: str, path: str,
|
|||
getreq_start_time,
|
||||
debug: bool,
|
||||
curr_session,
|
||||
max_posts_in_rss_feed: int) -> None:
|
||||
max_posts_in_rss_feed: int,
|
||||
system_language: str,
|
||||
fitness: {}) -> None:
|
||||
"""Returns an RSS2 feed for all blogs on this instance
|
||||
"""
|
||||
curr_session = \
|
||||
|
@ -107,7 +112,7 @@ def get_rss2site(self, calling_domain: str, path: str,
|
|||
port,
|
||||
max_posts_in_rss_feed, 1,
|
||||
False,
|
||||
self.server.system_language)
|
||||
system_language)
|
||||
break
|
||||
if msg:
|
||||
msg = rss2header(http_prefix,
|
||||
|
@ -122,7 +127,7 @@ def get_rss2site(self, calling_domain: str, path: str,
|
|||
if debug:
|
||||
print('Sent rss2 feed: ' +
|
||||
path + ' ' + calling_domain)
|
||||
fitness_performance(getreq_start_time, self.server.fitness,
|
||||
fitness_performance(getreq_start_time, fitness,
|
||||
'_GET', '_get_rss2site',
|
||||
debug)
|
||||
return
|
||||
|
@ -138,7 +143,8 @@ def get_rss3feed(self, calling_domain: str, path: str,
|
|||
getreq_start_time,
|
||||
debug: bool, system_language: str,
|
||||
curr_session,
|
||||
max_posts_in_rss_feed: int) -> None:
|
||||
max_posts_in_rss_feed: int,
|
||||
fitness: {}) -> None:
|
||||
"""Returns an RSS3 feed
|
||||
"""
|
||||
nickname = path.split('/blog/')[1]
|
||||
|
@ -168,7 +174,7 @@ def get_rss3feed(self, calling_domain: str, path: str,
|
|||
if debug:
|
||||
print('Sent rss3 feed: ' +
|
||||
path + ' ' + calling_domain)
|
||||
fitness_performance(getreq_start_time, self.server.fitness,
|
||||
fitness_performance(getreq_start_time, fitness,
|
||||
'_GET', '_get_rss3feed', debug)
|
||||
return
|
||||
if debug:
|
||||
|
|
Loading…
Reference in New Issue