mirror of
https://github.com/kittywitch/konawall-py.git
synced 2026-02-09 04:19:19 -08:00
Fix infinite addition of order:random
This commit is contained in:
parent
adace2ec76
commit
a3ff57bc21
1 changed files with 2 additions and 1 deletions
|
|
@ -15,7 +15,8 @@ Turn a list of tags and a count into a list of URLs to download from
|
||||||
def request_posts(count: int, tags: list) -> list:
|
def request_posts(count: int, tags: list) -> list:
|
||||||
logging.debug(f"request_posts() called with count={count}, tags=[{', '.join(tags)}]")
|
logging.debug(f"request_posts() called with count={count}, tags=[{', '.join(tags)}]")
|
||||||
# Make sure we get a different result every time by using "order:random" as a tag
|
# Make sure we get a different result every time by using "order:random" as a tag
|
||||||
tags.append("order:random")
|
if "order:random" not in tags:
|
||||||
|
tags.append("order:random")
|
||||||
# Tags are separated by a plus sign for this API
|
# Tags are separated by a plus sign for this API
|
||||||
tag_string: str = "+".join(tags)
|
tag_string: str = "+".join(tags)
|
||||||
# Request URL for getting posts from the API
|
# Request URL for getting posts from the API
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue