Skip to content

Commit

Permalink
Adjust XMLTV output to try to make it validate using tv_validate_file.
Browse files Browse the repository at this point in the history
The tag ordering and some attributes had to be adjusted.  Note, this change
is not tested, as I lack a test setup for running the code.

This should fix issue Frikanalen#103.
  • Loading branch information
petterreinholdtsen committed Nov 9, 2018
1 parent 641eb4b commit 898ed26
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions fkbeta/templates/agenda/xmltv.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<tv generator-info-name="fkbeta.agenda.xmltv">
<channel id="{{ channel_id }}">
<url>{{ site_url }}</url>
{% for channel_display_name in channel_display_names %}
<display-name>{{ channel_display_name }}</display-name>
{% endfor %}
<url>{{ site_url }}</url>
</channel>
{% for program in events %}
<programme
id="{{ channel_id }}"
start="{{ program.starttime|date:'YmdHis O' }}"
end="{{ program.endtime|date:'YmdHis O' }}">
channel="{{ channel_id }}"
start="{{ program.starttime|date:'YmdHis O' }}">
{% if program.video %}
<title lang="no">{{ program.video.name }}</title>
<desc lang="no"></desc>
<desc lang="no">{{ program.video.header }}</desc>
<url>{{ site_url }}{{ program.video.get_absolute_url }}</url>
<length unit="seconds">{{ program.video.duration.seconds }}</length>
<length units="seconds">{{ program.video.duration.seconds }}</length>
{% else %}
<title lang="no">{{ program.default_name }}</title>
<length unit="seconds">{{ program.duration.seconds }}</length>
<length units="seconds">{{ program.duration.seconds }}</length>
{% endif %}
</programme>
{% endfor %}
Expand Down

0 comments on commit 898ed26

Please sign in to comment.