From a6d800b4ca66393f859b4681791e1fc880b7618b Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Sat, 12 Jan 2019 20:11:15 +0100 Subject: [PATCH] templates: move icon_dir set outside of the loop Someone put this inside the loop despite it essentially being constant. Probably makes immeasurably little difference perf-wise, but why not fix it anyway. --- nyaa/templates/search_results.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nyaa/templates/search_results.html b/nyaa/templates/search_results.html index 0859e4b..1bf03b5 100644 --- a/nyaa/templates/search_results.html +++ b/nyaa/templates/search_results.html @@ -55,11 +55,11 @@ + {% set icon_dir = config.SITE_FLAVOR %} {% set torrents = torrent_query if use_elastic else torrent_query.items %} {% for torrent in torrents %} {% set cat_id = use_elastic and ((torrent.main_category_id|string) + '_' + (torrent.sub_category_id|string)) or torrent.sub_category.id_as_string %} - {% set icon_dir = config.SITE_FLAVOR %} {% if use_elastic %}