Add support for randomly sorting queries

This commit is contained in:
rubenwardy
2019-11-21 21:43:58 +00:00
parent 5b68e494db
commit 94426e97aa
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ class QueryBuilder:
self.types = types
self.search = args.get("q")
self.random = "random" in args
self.lucky = self.random or "lucky" in args
self.lucky = "lucky" in args
self.hide_nonfree = "nonfree" in hide_flags
self.limit = 1 if self.lucky else None
self.order_by = args.get("sort")