remove view image template on mobile requests

This commit is contained in:
jacr13 2021-04-12 17:45:32 +02:00
parent 50a93a8e0b
commit 7c7559756c

View File

@ -121,8 +121,11 @@ class Search:
self.config,
content_filter.near)
# force mobile search when view image is true
view_image = 'tbm=isch' in full_query and self.config.view_image
# force mobile search when view image is true and
# the request is not already made by a mobile
view_image = ('tbm=isch' in full_query
and self.config.view_image
and not g.user_request.mobile)
get_body = g.user_request.send(query=full_query,
force_mobile=view_image)