mirror of
https://github.com/kittywitch/konawall-py.git
synced 2026-02-09 04:19:19 -08:00
feat: genericized show
This commit is contained in:
parent
e9d89011f7
commit
7657c18f7d
3 changed files with 4 additions and 2 deletions
|
|
@ -92,7 +92,7 @@ class Konawall(wx.adv.TaskBarIcon):
|
|||
|
||||
def open_url(self, evt=None):
|
||||
for post in self.current:
|
||||
subprocess.call(["xdg-open", f'https://konachan.com/post/show/{post["id"]}'])
|
||||
subprocess.call(["xdg-open", post["show_url"])
|
||||
|
||||
def open_log(self, evt=None):
|
||||
subprocess.call(["xdg-open", self.log_path])
|
||||
|
|
|
|||
|
|
@ -38,8 +38,9 @@ def request_posts(count: int, tags: list, config) -> list:
|
|||
kv_print("Rating", post["rating"])
|
||||
kv_print("Resolution", f"{post['file']['width']}x{post['file']['height']}")
|
||||
kv_print("Tags", post["tags"])
|
||||
kv_print("URL", post["file"]["url"])
|
||||
kv_print("URL", post["file"]["url"])i
|
||||
# Append the URL to the list
|
||||
post["show_url"] = f"https://e621.net/posts/{post['id']}"
|
||||
posts.append(post)
|
||||
else:
|
||||
# Raise an exception if the request failed
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ def request_posts(count: int, tags: list, config={}) -> list:
|
|||
kv_print("Resolution", f"{post['width']}x{post['height']}")
|
||||
kv_print("Tags", post["tags"])
|
||||
kv_print("URL", post["file_url"])
|
||||
post["show_url"] = f"https://konachan.com/post/show/{post["id"]}"
|
||||
# Append the URL to the list
|
||||
posts.append(post)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue