diff --git a/cps/templates/author.html b/cps/templates/author.html
index 0015d6e2..f043e618 100644
--- a/cps/templates/author.html
+++ b/cps/templates/author.html
@@ -65,7 +65,7 @@
{% endif %}
{% endfor %}
{% for format in entry.data %}
- {% if format.format|lower == 'mp3' %}
+ {% if format.format|lower in g.constants.EXTENSIONS_AUDIO %}
{% endif %}
{% endfor %}
diff --git a/cps/templates/index.html b/cps/templates/index.html
index e60f92fe..b9795b9a 100644
--- a/cps/templates/index.html
+++ b/cps/templates/index.html
@@ -104,7 +104,7 @@
{% endif %}
{% endfor %}
{% for format in entry.data %}
- {% if format.format|lower == 'mp3' %}
+ {% if format.format|lower in g.constants.EXTENSIONS_AUDIO %}
{% endif %}
{%endfor%}
diff --git a/cps/templates/search.html b/cps/templates/search.html
index cba430a4..3b694229 100644
--- a/cps/templates/search.html
+++ b/cps/templates/search.html
@@ -67,7 +67,7 @@
{% endif %}
{% endfor %}
{% for format in entry.data %}
- {% if format.format|lower == 'mp3' %}
+ {% if format.format|lower in g.constants.EXTENSIONS_AUDIO %}
{% endif %}
{% endfor %}
diff --git a/cps/web.py b/cps/web.py
index 3b337e7e..a5844f69 100644
--- a/cps/web.py
+++ b/cps/web.py
@@ -293,6 +293,7 @@ def edit_required(f):
def before_request():
if current_user.is_authenticated:
confirm_login()
+ g.constants = constants
g.user = current_user
g.allow_registration = config.config_public_reg
g.allow_anonymous = config.config_anonbrowse