<commit_before>{# episode.html #}
{% extends "base.html" %}

{% block head %}
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="http://formstone.it/components/Zoomer/jquery.fs.zoomer.js"></script>
<link href="http://formstone.it/components/Zoomer/jquery.fs.zoomer.css" rel="stylesheet">
<title>veyepar: {{episode.name}}</title>
{% endblock %}

{% block content %}


--client <a href="{% url client client.slug %}">{{ client.slug }}</a>
--show <a href="{% url episode_list client.slug show.slug%}">{{ show.slug }}</a> {{episode.id}} --force
<br/>

{% if prev_episode %}
  <a href="/main/E/{{ prev_episode.id }}">Prev: {{prev_episode.state }} {{prev_episode.name }}</a>
{% else %}
  Prev: (none, at start of list)
{% endif %}
<br/>
{% if next_episode %}
<a href="/main/E/{{ next_episode.id }}">Next: {{next_episode.state }} {{next_episode.name }}</a>
{% else %}
  Next: (none, at end of list)
{% endif %}

<table>
<tbody>
<tr><td>Name</td><td><b>{{episode.name}}</b></td></tr>
<tr><td>Author(s)</td><td>{{episode.authors}} </td></tr>
<tr><td>Location</td><td><a href="{% url admin:main_location_change location.id%}">{{episode.location}}</a></td><td>{{episode.location.channelcopy}}</td>
</tr>
<tr><td>Date</td><td><a href="{% url episode_list client_slug=client.slug show_slug=show.slug %}?client={{client.slug}}&amp;show={{show.slug}}&amp;location={{episode.location.slug}}&amp;date={{episode.start|date:"Y-m-d"}}">
            {{episode.start|date:"b D d"}}</a></td>
    <td> <a href="{% url rf_set episode.location.slug %}?start_date={{episode.start|date:"Y-m-d"}}">Days Raw Files</a> </td>
</tr>

<tr><td>Start</td><td>{% if same_dates %}{{episode.start|date:"H:i"}}{% else %}{{episode.start}}{% endif %}</td>
<td>First Raw Start</td><td>{% if same_dates %}{{clrffs.0.0.raw_file.start|date:"H:i"}}{% else %}{{clrffs.0.0.raw_file.start}}{% endif %}</td></tr>
<tr>
<td>Duration</td><td>{{episode.duration}}</td>
<td>Offset</td><td>{{offset}}</td>

</tr>
<tr><td>End</td><td> {% if same_dates %}{{episode.end|date:"H:i"}}{% else %}{{episode.end}}{% endif %} </td>
<td>Last Raw End</td> {% with clrffs|last as last_clrffs %}{% with last_clrffs.0.raw_file.end as end %} <td>{% if same_dates %} {{end|date:"H:i"}} {% else %} {{end}} {% endif %}</td> {% endwith %} {% endwith %}
</tr>
<tr>
    <td>Segments</td> <td>
        {% for chap in chaps %}
          {% if chap.0 %}
            {{chap.0.1}},
          {%endif%}
        {%endfor%}
    </td>
</tr>

</tbody>
</table>

{% if episode.conf_url %}
  <a href="{{episode.conf_url}}">{{episode.conf_url}}</a><br/>
{% endif %}
Admin: <a href="{% url admin:main_episode_change episode.id%}">episode</a>
<a href="{% url admin:main_cut_list_changelist %}?episode__id__exact={{episode.id}}">cut list</a>
<br>

{% if episode.edit_key and user.is_authenticated %}
   <a href="{% url train episode.id episode.slug episode.edit_key %}">train</a>
   <a href="{% url approve_episode episode.id episode.slug episode.edit_key %}">approve</a>
<a href="{% url guest_episode_review show_slug=episode.show.slug episode_slug=episode.slug edit_key=episode.edit_key %}">Simple UI</a><br/>
{% endif %}

{% if episode.public_url %}
<img src ="{{MEDIA_URL}}/{{episode.show.client.slug}}/{{episode.show.slug}}/webm/{{episode.slug}}_audio.png"><br/>
{% endif %}

<a href="{% url raw_list episode.id %}{{episode.slug}}.m3u">raw-playlist</a>
<a href="{% url raw_list episode.id %}{{episode.slug}}-ogv.m3u?ext=ogv">raw-ogv-playlist</a>

<a href="{% url public_play_list %}{{episode.slug}}.m3u?id={{episode.id}}">encoded-files-playlist</a> 

{% if episode.host_url %} <a href="{{episode.host_url}}">host</a> {%endif%}
<a href="{% url pdf 'release_agreements' show.id episode.id %}{{episode.slug}}.pdf">release.pdf</a>
{%if episode.public_url%}<a href="{{episode.public_url}}">public</a>{%endif%}
<br/>
<a href="{% url episode_logs episode.id %}">logs</a><br/>
<a href="{% url eps_xfer episode.show.client.slug episode.show.slug %}?id={{episode.id}}">{{episode.slug}}.json</a>

<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/titles/{{episode.slug}}.svg"> svg</a>
<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/titles/{{episode.slug}}.png"> png</a><br/>

{# <video src="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/ogv/{{episode.slug}}.ogv" controls width=200 ></video> #}
<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/ogv/{{episode.slug}}.ogv">ogv</a>
<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/mp4/{{episode.slug}}.mp4">mp4</a>
<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/webm/{{episode.slug}}.webm">webm</a>

<form method="POST">{% csrf_token %}
<input type="submit" value="{{user.is_authenticated|yesno:"Save,not logged in,"}}" />

<table border=1 >
<tbody>
{{ episode_form }}
</tbody>
</table>

<input type="submit" value="Save" />

{% if episode.image_file_set.all %}
<div class="viewer" style="height: 200px; width: 800px;" >
{% for img in episode.image_file_set.all %}
    <img alt="recording sheet" src="http://172.16.31.10/static/veyepar/{{client.slug}}/{{show.slug}}/img/{{img.filename}}" width=200 height=400 >
{% endfor %}
</div>

 <script>
$(".viewer").zoomer();
 </script>
{% endif %}

{% comment %}
{% for img in episode.image_file_set.all %}
<a href="http://172.16.31.10/static/veyepar/{{client.slug}}/{{show.slug}}/img/{{img.filename}}">
    <img alt="recording sheet" src="http://172.16.31.10/static/veyepar/{{client.slug}}/{{show.slug}}/img/{{img.filename}}" width=90 >
</a>
{% endfor %}
{% endcomment %}


{{ clrfformset.management_form }}

<div class="panel-group" id="accordion">

{% for cl,chap,clrfform in clrffs %}

<div class="panel">
  <div class="panel-heading"></div>
  <div class="panel-title"></div> 
  <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#{{cl.raw_file.id}}"> {{cl.raw_file.filename}}</a>
  {{cl.raw_file.start|date:"H:i:s"}}
  {{ clrfform.apply.label_tag }}{{ clrfform.apply }}

  <div class="panel-collapse collapse" id="{{cl.raw_file.id}}">
    <div class="panel-body">
      {{clrfform.clid}}

~/Videos/veyepar/{{cl.raw_file.base_url}} 
      <table>
      <tr>
      <td>
        {{ clrfform.sequence.label_tag }}: {{ clrfform.sequence }}</br>
        <a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.filename}}">
          {{ cl.raw_file.filename }}</a></br>
        <a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.basename}}.ogv"
          target=foo>{{ cl.raw_file.basename }}.ogv</a></br>
        <a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.basename}}.png">
          {{cl.raw_file.basename}}.png</a></br>
        <video
          id="rawfile{{ cl.id }}"
          src ="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.basename}}.ogv"
          controls width=200
          preload="none"
          poster ="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.basename}}.png">
        </video>
      </td>

      <td>
        <table>
            <tr>
                <td>&nbsp;</td>
                <td><a href="#{{cl.raw_file.id}}">Raw File</a></td>
                <td>Cut List</td>
            </tr>

            <tr>
                <td>&nbsp;</td>
                <td>{{ clrfform.trash.label_tag }}{{ clrfform.trash }}</td>
            </tr>

            <tr><commit_msg>fix html errors<commit_after>{# episode.html #}
{% extends "base.html" %}

{% block head %}
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="http://formstone.it/components/Zoomer/jquery.fs.zoomer.js"></script>
<link href="http://formstone.it/components/Zoomer/jquery.fs.zoomer.css" rel="stylesheet">
<title>veyepar: {{episode.name}}</title>
{% endblock %}

{% block content %}


--client <a href="{% url client client.slug %}">{{ client.slug }}</a>
--show <a href="{% url episode_list client.slug show.slug%}">{{ show.slug }}</a> {{episode.id}} --force
<br/>

{% if prev_episode %}
  <a href="/main/E/{{ prev_episode.id }}">Prev: {{prev_episode.state }} {{prev_episode.name }}</a>
{% else %}
  Prev: (none, at start of list)
{% endif %}
<br/>
{% if next_episode %}
<a href="/main/E/{{ next_episode.id }}">Next: {{next_episode.state }} {{next_episode.name }}</a>
{% else %}
  Next: (none, at end of list)
{% endif %}

<table>
<tbody>
<tr><td>Name</td><td><b>{{episode.name}}</b></td></tr>
<tr><td>Author(s)</td><td>{{episode.authors}} </td></tr>
<tr><td>Location</td><td><a href="{% url admin:main_location_change location.id%}">{{episode.location}}</a></td><td>{{episode.location.channelcopy}}</td>
</tr>
<tr><td>Date</td><td><a href="{% url episode_list client_slug=client.slug show_slug=show.slug %}?client={{client.slug}}&amp;show={{show.slug}}&amp;location={{episode.location.slug}}&amp;date={{episode.start|date:"Y-m-d"}}">
            {{episode.start|date:"b D d"}}</a></td>
    <td> <a href="{% url rf_set episode.location.slug %}?start_date={{episode.start|date:"Y-m-d"}}">Days Raw Files</a> </td>
</tr>

<tr><td>Start</td><td>{% if same_dates %}{{episode.start|date:"H:i"}}{% else %}{{episode.start}}{% endif %}</td>
<td>First Raw Start</td><td>{% if same_dates %}{{clrffs.0.0.raw_file.start|date:"H:i"}}{% else %}{{clrffs.0.0.raw_file.start}}{% endif %}</td></tr>
<tr>
<td>Duration</td><td>{{episode.duration}}</td>
<td>Offset</td><td>{{offset}}</td>

</tr>
<tr><td>End</td><td> {% if same_dates %}{{episode.end|date:"H:i"}}{% else %}{{episode.end}}{% endif %} </td>
<td>Last Raw End</td> {% with clrffs|last as last_clrffs %}{% with last_clrffs.0.raw_file.end as end %} <td>{% if same_dates %} {{end|date:"H:i"}} {% else %} {{end}} {% endif %}</td> {% endwith %} {% endwith %}
</tr>
<tr>
    <td>Segments</td> <td>
        {% for chap in chaps %}
          {% if chap.0 %}
            {{chap.0.1}},
          {%endif%}
        {%endfor%}
    </td>
</tr>

</tbody>
</table>

{% if episode.conf_url %}
  <a href="{{episode.conf_url}}">{{episode.conf_url}}</a><br/>
{% endif %}
Admin: <a href="{% url admin:main_episode_change episode.id%}">episode</a>
<a href="{% url admin:main_cut_list_changelist %}?episode__id__exact={{episode.id}}">cut list</a>
<br>

{% if episode.edit_key and user.is_authenticated %}
   <a href="{% url train episode.id episode.slug episode.edit_key %}">train</a>
   <a href="{% url approve_episode episode.id episode.slug episode.edit_key %}">approve</a>
<a href="{% url guest_episode_review show_slug=episode.show.slug episode_slug=episode.slug edit_key=episode.edit_key %}">Simple UI</a><br/>
{% endif %}

{% if episode.public_url %}
<img src ="{{MEDIA_URL}}/{{episode.show.client.slug}}/{{episode.show.slug}}/webm/{{episode.slug}}_audio.png" alt="final audio"><br/>
{% endif %}

<a href="{% url raw_list episode.id %}{{episode.slug}}.m3u">raw-playlist</a>
<a href="{% url raw_list episode.id %}{{episode.slug}}-ogv.m3u?ext=ogv">raw-ogv-playlist</a>

<a href="{% url public_play_list %}{{episode.slug}}.m3u?id={{episode.id}}">encoded-files-playlist</a> 

{% if episode.host_url %} <a href="{{episode.host_url}}">host</a> {%endif%}
<a href="{% url pdf 'release_agreements' show.id episode.id %}{{episode.slug}}.pdf">release.pdf</a>
{%if episode.public_url%}<a href="{{episode.public_url}}">public</a>{%endif%}
<br/>
<a href="{% url episode_logs episode.id %}">logs</a><br/>
<a href="{% url eps_xfer episode.show.client.slug episode.show.slug %}?id={{episode.id}}">{{episode.slug}}.json</a>

<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/titles/{{episode.slug}}.svg"> svg</a>
<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/titles/{{episode.slug}}.png"> png</a><br/>

{# <video src="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/ogv/{{episode.slug}}.ogv" controls width=200 ></video> #}
<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/ogv/{{episode.slug}}.ogv">ogv</a>
<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/mp4/{{episode.slug}}.mp4">mp4</a>
<a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/webm/{{episode.slug}}.webm">webm</a>

<form method="POST">{% csrf_token %}
<input type="submit" value="{{user.is_authenticated|yesno:"Save,not logged in,"}}" />

<table border=1 >
<tbody>
{{ episode_form }}
</tbody>
</table>

<input type="submit" value="Save" />

{% if episode.image_file_set.all %}
<div class="viewer" style="height: 200px; width: 800px;" >
{% for img in episode.image_file_set.all %}
    <img alt="recording sheet" src="http://172.16.31.10/static/veyepar/{{client.slug}}/{{show.slug}}/img/{{img.filename}}" width=200 height=400 >
{% endfor %}
</div>

 <script>
$(".viewer").zoomer();
 </script>
{% endif %}

{% comment %}
{% for img in episode.image_file_set.all %}
<a href="http://172.16.31.10/static/veyepar/{{client.slug}}/{{show.slug}}/img/{{img.filename}}">
    <img alt="recording sheet" src="http://172.16.31.10/static/veyepar/{{client.slug}}/{{show.slug}}/img/{{img.filename}}" width=90 >
</a>
{% endfor %}
{% endcomment %}


{{ clrfformset.management_form }}

<div class="panel-group" id="accordion">

{% for cl,chap,clrfform in clrffs %}

<div class="panel">
  <div class="panel-heading"></div>
  <div class="panel-title"></div> 
  <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#{{cl.raw_file.id}}"> {{cl.raw_file.filename}}</a>
  {{cl.raw_file.start|date:"H:i:s"}}
  {{ clrfform.apply.label_tag }}{{ clrfform.apply }}

  <div class="panel-collapse collapse" id="{{cl.raw_file.id}}">
    <div class="panel-body">
      {{clrfform.clid}}

~/Videos/veyepar/{{cl.raw_file.base_url}} 
      <table>
      <tr>
      <td>
        {{ clrfform.sequence.label_tag }}: {{ clrfform.sequence }}<br/>
        <a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.filename}}">
          {{ cl.raw_file.filename }}</a><br/>
        <a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.basename}}.ogv"
          target=foo>{{ cl.raw_file.basename }}.ogv</a><br/>
        <a href="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.basename}}.png">
          {{cl.raw_file.basename}}.png</a><br/>
        <video
          id="rawfile{{ cl.id }}"
          src ="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.basename}}.ogv"
          controls width=200
          preload="none"
          poster ="{{MEDIA_URL}}/{{client.slug}}/{{show.slug}}/dv/{{location.slug}}/{{cl.raw_file.basename}}.png">
        </video>
      </td>

      <td>
        <table>
            <tr>
                <td>&nbsp;</td>
                <td><a href="#{{cl.raw_file.id}}">Raw File</a></td>
                <td>Cut List</td>
            </tr>

            <tr>
                <td>&nbsp;</td>
                <td>{{ clrfform.trash.label_tag }}{{ clrfform.trash }}</td>
            </tr>

            <tr>
{'fraction_non_alphanumeric': 0.2613215042372881, 'fraction_numerical': 0.009004237288135594, 'mean_word_length': 4.199655765920826, 'pattern_counts': {'":': 0, '<': 407, '<?xml version=': 0, '>': 407, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '4097315', 'n_tokens_mistral': 6329, 'n_tokens_neox': 5880, 'n_words': 861}