Commit b4f356de authored by fred's avatar fred
Browse files

defer to soundfile to get episode and emission

parent 1f4c9944
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<audio <audio
data-player='true' data-player='true'
class='hidden' class='hidden'
data-url="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}" data-url="{% url 'episode-view' emission_slug=sound.episode.emission.slug slug=sound.episode.slug %}"
title="{{episode.title}}" title="{{sound.episode.title}}"
id="Audio-{{ sound.file.url|slugify }}" id="Audio-{{ sound.file.url|slugify }}"
preload="{% if preload %}{{ preload }}{% else %}none{% endif %}" preload="{% if preload %}{{ preload }}{% else %}none{% endif %}"
controls="{% if controls %}{{ controls }}{% else %}controls{% endif%}" controls="{% if controls %}{{ controls }}{% else %}controls{% endif%}"
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
"audio/ogg":{% if sound|is_format_available:'ogg' %}{{ sound|format_url:'ogg'|jsonify|safe }}{% else %}false{% endif %}, "audio/ogg":{% if sound|is_format_available:'ogg' %}{{ sound|format_url:'ogg'|jsonify|safe }}{% else %}false{% endif %},
"audio/mpeg":{% if sound|is_format_available:'mp3' %}{{ sound|format_url:'mp3'|jsonify|safe }}{% else %}false{% endif %} "audio/mpeg":{% if sound|is_format_available:'mp3' %}{{ sound|format_url:'mp3'|jsonify|safe }}{% else %}false{% endif %}
}, },
"emission": "{{episode.slug}}", "emission": "{{sound.episode.emission.slug}}",
"episode": "{{episode.slug}}", "episode": "{{sound.episode.slug}}",
"title": {{episode.title|jsonify|safe}}, "title": {{sound.episode.title|jsonify|safe}},
"id":"{{ sound.file.url|slugify }}" "id":"{{ sound.file.url|slugify }}"
} }
</code> </code>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment