<commit_before><?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gm="http://www.google.com/schemas/gm/1.1" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

{% regroup object_list by show as show_list %}{% for show in show_list %}<channel>
    <title>{{ show.grouper.title }}</title>
    <link>{{ show.grouper.link }}</link>
    <description>{{ show.grouper.description }}</description>
    {% ifequal show.grouper.copyright "All rights reserved" %}<media:copyright{% if show.grouper.copyright_url %} url="{{ show.grouper.copyright_url }}"{% endif %}>{% now "Y" %} {{ show.grouper.organization }}. {{ show.grouper.copyright }}.</media:copyright>
    {% else %}
    {% ifequal show.grouper.copyright "Public domain" %}<media:copyright{% if show.grouper.copyright_url %} url="{{ show.grouper.copyright_url }}"{% endif %}>{% now "Y" %} {{ show.grouper.organization }}. {{ show.grouper.copyright }}.</media:copyright>
    {% else %}
    <creativeCommons:license>{{ show.grouper.copyright }}</creativeCommons:license>{% endifequal %}{% endifequal %}
    
    {% for episode in show.list %}
    <item>
        <pubDate>{{ episode.date|date:"r" }} GMT</pubDate>
        {% for enclosure in enclosure_list %}
        <media:content{% if enclosure.file %} url="{{ enclosure.file.url }}"{% endif %}{% if enclosure.file.medium %} medium="{{ enclosure.file.medium|lower }}"{% endif %}{% if enclosure.file.mime %} type="{{ enclosure.file.mime|lower }}"{% endif %} fileSize="{{ enclosure.file.size }}" lang="{{ episode.show.language|lower }}"{% if enclosure.expression %} expression="{{ enclosure.expression|lower }}"{% endif %}{% if enclosure.bitrate %} bitrate="{{ enclosure.bitrate }}"{% endif %}{% if enclosure.frame %} framerate="{{ enclosure.frame }}"{% endif %}{% if enclosure.sample %} samplingrate="{{ enclosure.sample }}"{% endif %}{% if enclosure.channel %} channels="{{ enclosure.channel }}"{% endif %}{% ifequal enclosure.medium "Image" %} width="{{ enclosure.file.width }}" height="{{ enclosure.file.height }}"{% endifequal %}{% if forloop.first	%} isDefault="true"{% endif %}>
            {% if enclosure.player %}<media:player url="{{ enclosure.player }}"{% if enclosure.width %} width="{{ enclosure.width }}"{% endif %}{% if enclosure.height %} height="{{ enclosure.height }}"{% endif %}/>{% endif %}
            <media:title{% if episode.title_type %} type="{{ episode.title_type|lower }}"{% endif %}>{{ episode.title }}</media:title>
            <media:description{% if episode.description_type %} type="{{ episode.description_type|lower }}"{% endif %}>{{ episode.description }}</media:description>
            <media:credit role="productioncompany">{{ episode.show.organization }}</media:credit>
            {% if episode.role %}<media:credit role="{{ episode.role|lower }}" scheme="urn:ebu">{{ episode.show.author.all.0.first_name }} {{ episode.show.author.all.0.last_name }}</media:credit>{% endif %}
            {% if episode.media_category %}{% for category in episode.media_category.all %}
            <media:category>{{ category.name }}</media:category>
            {% endfor %}{% endif %}
            {% if enclosure.hash %}<media:hash{% if enclosure.algo %} algo="{{ enclosure.algo|lower }}"{% endif %}>{{ enclosure.hash }}</media:hash>{% endif %}
            {% if episode.text %}{{ episode.text }}{% endif %}
            {% if episode.image %}<media:thumbnail url="{{ episode.image.url }}" width="{{ episode.image.width }}" height="{{ episode.image.height }}"/>{% endif %}
            {% if episode.rating %}<media:rating scheme="urn:{{ episode.rating|lower }}">{{ episode.standard|lower }}</media:rating>{% endif %}
            {% if episode.deny %}<media:restriction relationship="deny" type="country">{{ episode.restriction }}</media:restriction>{% endif %}
            {% if episode.keywords %}<media:keywords>{{ episode.keywords }}</media:keywords>{% endif %}
            <dcterms:valid>{% if episode.start %}start={{ episode.start|date:"r" }}; {% endif %}{% if episode.end %}end={{ episode.end|date:"r" }}; {% endif %}{% if episode.scheme %}scheme={{ episode.scheme }}; {% endif %}{% if episode.name %}name={{ episode.name }};{% endif %}</dcterms:valid>
            {% if episode.preview %}<gm:preview enabled="true"{% if episode.preview_start_mins and episode.preview_start_secs %} start="{{ episode.preview_start_mins }}:{{ episode.preview_start_secs }}"{% endif %}{% if episode.preview_end_mins and episode.preview_end_secs %} end="{{ episode.preview_end_mins }}:{{ episode.preview_end_secs }}{% endif %}"/>{% endif %}
            {% if episode.start and episode.end and episode.host %}<gm:hostOnExpire enabled="true">{% endif %}
        </media:content>
        {% endfor %}
      </item>
    {% endfor %}

</channel>
{% endfor %}
</rss><commit_msg>Testing out a solution...I think this will fix multiple enclosure for Media RSS feeds.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gm="http://www.google.com/schemas/gm/1.1" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

{% regroup object_list by show as show_list %}{% for show in show_list %}<channel>
    <title>{{ show.grouper.title }}</title>
    <link>{{ show.grouper.link }}</link>
    <description>{{ show.grouper.description }}</description>
    {% ifequal show.grouper.copyright "All rights reserved" %}<media:copyright{% if show.grouper.copyright_url %} url="{{ show.grouper.copyright_url }}"{% endif %}>{% now "Y" %} {{ show.grouper.organization }}. {{ show.grouper.copyright }}.</media:copyright>
    {% else %}
    {% ifequal show.grouper.copyright "Public domain" %}<media:copyright{% if show.grouper.copyright_url %} url="{{ show.grouper.copyright_url }}"{% endif %}>{% now "Y" %} {{ show.grouper.organization }}. {{ show.grouper.copyright }}.</media:copyright>
    {% else %}
    <creativeCommons:license>{{ show.grouper.copyright }}</creativeCommons:license>{% endifequal %}{% endifequal %}
    
    {% for episode in show.list %}
    <item>
        <pubDate>{{ episode.date|date:"r" }} GMT</pubDate>
        {% regroup enclosure_list by episode as enclosures %}
        {% for enclosure in enclosures %}
        <media:content{% if enclosure.file %} url="{{ enclosure.file.url }}"{% endif %}{% if enclosure.file.medium %} medium="{{ enclosure.file.medium|lower }}"{% endif %}{% if enclosure.file.mime %} type="{{ enclosure.file.mime|lower }}"{% endif %} fileSize="{{ enclosure.file.size }}" lang="{{ episode.show.language|lower }}"{% if enclosure.expression %} expression="{{ enclosure.expression|lower }}"{% endif %}{% if enclosure.bitrate %} bitrate="{{ enclosure.bitrate }}"{% endif %}{% if enclosure.frame %} framerate="{{ enclosure.frame }}"{% endif %}{% if enclosure.sample %} samplingrate="{{ enclosure.sample }}"{% endif %}{% if enclosure.channel %} channels="{{ enclosure.channel }}"{% endif %}{% ifequal enclosure.medium "Image" %} width="{{ enclosure.file.width }}" height="{{ enclosure.file.height }}"{% endifequal %}{% if forloop.first	%} isDefault="true"{% endif %}>
            {% if enclosure.player %}<media:player url="{{ enclosure.player }}"{% if enclosure.width %} width="{{ enclosure.width }}"{% endif %}{% if enclosure.height %} height="{{ enclosure.height }}"{% endif %}/>{% endif %}
            <media:title{% if episode.title_type %} type="{{ episode.title_type|lower }}"{% endif %}>{{ episode.title }}</media:title>
            <media:description{% if episode.description_type %} type="{{ episode.description_type|lower }}"{% endif %}>{{ episode.description }}</media:description>
            <media:credit role="productioncompany">{{ episode.show.organization }}</media:credit>
            {% if episode.role %}<media:credit role="{{ episode.role|lower }}" scheme="urn:ebu">{{ episode.show.author.all.0.first_name }} {{ episode.show.author.all.0.last_name }}</media:credit>{% endif %}
            {% if episode.media_category %}{% for category in episode.media_category.all %}
            <media:category>{{ category.name }}</media:category>
            {% endfor %}{% endif %}
            {% if enclosure.hash %}<media:hash{% if enclosure.algo %} algo="{{ enclosure.algo|lower }}"{% endif %}>{{ enclosure.hash }}</media:hash>{% endif %}
            {% if episode.text %}{{ episode.text }}{% endif %}
            {% if episode.image %}<media:thumbnail url="{{ episode.image.url }}" width="{{ episode.image.width }}" height="{{ episode.image.height }}"/>{% endif %}
            {% if episode.rating %}<media:rating scheme="urn:{{ episode.rating|lower }}">{{ episode.standard|lower }}</media:rating>{% endif %}
            {% if episode.deny %}<media:restriction relationship="deny" type="country">{{ episode.restriction }}</media:restriction>{% endif %}
            {% if episode.keywords %}<media:keywords>{{ episode.keywords }}</media:keywords>{% endif %}
            <dcterms:valid>{% if episode.start %}start={{ episode.start|date:"r" }}; {% endif %}{% if episode.end %}end={{ episode.end|date:"r" }}; {% endif %}{% if episode.scheme %}scheme={{ episode.scheme }}; {% endif %}{% if episode.name %}name={{ episode.name }};{% endif %}</dcterms:valid>
            {% if episode.preview %}<gm:preview enabled="true"{% if episode.preview_start_mins and episode.preview_start_secs %} start="{{ episode.preview_start_mins }}:{{ episode.preview_start_secs }}"{% endif %}{% if episode.preview_end_mins and episode.preview_end_secs %} end="{{ episode.preview_end_mins }}:{{ episode.preview_end_secs }}{% endif %}"/>{% endif %}
            {% if episode.start and episode.end and episode.host %}<gm:hostOnExpire enabled="true">{% endif %}
        </media:content>
        {% endfor %}
      </item>
    {% endfor %}

</channel>
{% endfor %}
</rss>
{'fraction_non_alphanumeric': 0.211513518906515, 'fraction_numerical': 0.0017958695001496557, 'mean_word_length': 4.298097251585624, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 2, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6884059', 'n_tokens_mistral': 3377, 'n_tokens_neox': 2931, 'n_words': 618}