Add game name to search queries filtering by game

This commit is contained in:
rubenwardy 2024-01-28 22:35:49 +00:00
parent 8aa596b31a
commit 3f2960e7e6

@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
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.orm import subqueryload
from sqlalchemy.sql.expression import func
@ -49,6 +49,9 @@ class QueryBuilder:
if self.search:
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
@property