mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
show post author (very ugly as of now)
This commit is contained in:
@@ -7,6 +7,7 @@ class AppState:
|
||||
posts: List[Dict[str, Any]]
|
||||
post_titles: List[str]
|
||||
post_urls: List[str]
|
||||
post_author: List[str]
|
||||
debug: bool = False
|
||||
tracker: str = "rutracker"
|
||||
api_url: str = "https://api.michijackson.xyz"
|
||||
@@ -16,4 +17,4 @@ class AppState:
|
||||
aria2: Optional[Any] = None
|
||||
aria2_threads: int = 4
|
||||
|
||||
state = AppState(posts=[], post_titles=[], post_urls=[], download_path="")
|
||||
state = AppState(posts=[], post_titles=[], post_urls=[], post_author=[], download_path="")
|
||||
|
||||
@@ -11,10 +11,11 @@ def split_data(data):
|
||||
return count, posts, query, success
|
||||
|
||||
def format_data(data):
|
||||
post_author = [post["author"] for post in data]
|
||||
post_titles = [post["title"] for post in data]
|
||||
post_links = [post["url"] for post in data]
|
||||
|
||||
return post_titles, post_links
|
||||
return post_titles, post_links, post_author
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user