Commit b4f356de authored by fred's avatar fred
Browse files

defer to soundfile to get episode and emission

parent 1f4c9944
......@@ -34,8 +34,8 @@
<audio
data-player='true'
class='hidden'
data-url="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}"
title="{{episode.title}}"
data-url="{% url 'episode-view' emission_slug=sound.episode.emission.slug slug=sound.episode.slug %}"
title="{{sound.episode.title}}"
id="Audio-{{ sound.file.url|slugify }}"
preload="{% if preload %}{{ preload }}{% else %}none{% endif %}"
controls="{% if controls %}{{ controls }}{% else %}controls{% endif%}"
......@@ -62,9 +62,9 @@
"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 %}
},
"emission": "{{episode.slug}}",
"episode": "{{episode.slug}}",
"title": {{episode.title|jsonify|safe}},
"emission": "{{sound.episode.emission.slug}}",
"episode": "{{sound.episode.slug}}",
"title": {{sound.episode.title|jsonify|safe}},
"id":"{{ sound.file.url|slugify }}"
}
</code>
......
Markdown is supported
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