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,6 +15,7 @@ Turn a list of tags and a count into a list of URLs to download from
|
|||
def request_posts(count: int, tags: list) -> list:
|
||||
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
|
||||
if "order:random" not in tags:
|
||||
tags.append("order:random")
|
||||
# Tags are separated by a plus sign for this API
|
||||
tag_string: str = "+".join(tags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue