mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Add game name to search queries filtering by game
This commit is contained in:
parent
8aa596b31a
commit
3f2960e7e6
@ -15,7 +15,7 @@
|
|||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from flask import abort, current_app, request
|
from flask import abort, current_app, request
|
||||||
from flask_babel import lazy_gettext
|
from flask_babel import lazy_gettext, gettext
|
||||||
from sqlalchemy import or_
|
from sqlalchemy import or_
|
||||||
from sqlalchemy.orm import subqueryload
|
from sqlalchemy.orm import subqueryload
|
||||||
from sqlalchemy.sql.expression import func
|
from sqlalchemy.sql.expression import func
|
||||||
@ -49,6 +49,9 @@ class QueryBuilder:
|
|||||||
if self.search:
|
if self.search:
|
||||||
ret = f"{self.search} - {ret}"
|
ret = f"{self.search} - {ret}"
|
||||||
|
|
||||||
|
if self.game:
|
||||||
|
ret = gettext("%(package_type)s for %(game_name)s", package_type=ret, game_name=self.game.title)
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user