<commit_before>.page-header.pb-2.mt-4.mb-2.border-bottom
  %h1= @video.name
  - if policy(@video).download?
    %a.btn.btn-primary{href: download_video_path(@video)}
      %i.icon-download-alt.icon-white
      Download
  - if policy(@video).edit?
    %a.btn.btn-primary{href: edit_video_path(@video)}
      %i.icon-edit.icon-white
      Edit

.slider-container.col-10
  %ul.snapshots.row
    - @video.snapshots.order(video_time: :asc).processed.each do |snapshot|
      %li.col-12
        = image_tag(escape_snapshot_url(snapshot.image_url(:large)))
        %p.timestamp=snapshot.formated_video_time

  %ul.rslides_tabs.rslides1_tabs.row
    - @video.snapshots.processed.each_with_index do |snapshot, i|
      %li
        = link_to '#', class: "rslides1_s#{i + 1}" do
          = image_tag(escape_snapshot_url(snapshot.image_url(:tiny)))

%section.extra-info.col-10
  %h3 Extra Info
  .accordion
    .card.bg-light
      .card-body
        %ul.accordion-inner.unstyled.well
          %li
            %strong File Hash:
            #{@video.file_hash}
          %li
            %strong Air Date:
            #{@video.formated_air_date}
          %li
            %strong External ID
            #{@video.external_id}

- if policy(Upload).index?
  %section.uploads.col-10
    %h3 External Uploads
    .card.bg-light
      .card-body
        - if @uploads.empty?
          No External Uploads
        - @uploads.each do |upload|
          = link_to upload.host_provider.name, upload.url, class: 'btn btn-primary'

%section.metadata.col-10#metadata
  %h3 Metadata
  .accordion
    - @video.file_metadata&.each do |section_name, section_content|
      .card.bg-light
        .card-header
          %h4
            %button.btn.btn-link.collapsed{type: 'button', data: {toggle: 'collapse', target: "##{section_name}-metadata"}, aria: { expanded: false, controls: "#{section_name}-metadata" }}
              = section_name.titleize
        .collapse{id: "#{section_name}-metadata", data: { parent: '#metadata' }}
          .card-body<commit_msg>Include link to index image on video page.<commit_after>.page-header.pb-2.mt-4.mb-2.border-bottom
  %h1= @video.name
  - if policy(@video).download?
    %a.btn.btn-primary{href: download_video_path(@video)}
      %i.icon-download-alt.icon-white
      Download
  - if policy(@video).edit?
    %a.btn.btn-primary{href: edit_video_path(@video)}
      %i.icon-edit.icon-white
      Edit

.slider-container.col-10
  %ul.snapshots.row
    - @video.snapshots.order(video_time: :asc).processed.each do |snapshot|
      %li.col-12
        = image_tag(escape_snapshot_url(snapshot.image_url(:large)))
        %p.timestamp=snapshot.formated_video_time

  %ul.rslides_tabs.rslides1_tabs.row
    - @video.snapshots.processed.each_with_index do |snapshot, i|
      %li
        = link_to '#', class: "rslides1_s#{i + 1}" do
          = image_tag(escape_snapshot_url(snapshot.image_url(:tiny)))

%section.extra-info.col-10
  %h3 Extra Info
  .accordion
    .card.bg-light
      .card-body
        %ul.accordion-inner.unstyled.well
          %li
            %strong File Hash:
            = @video.file_hash
          %li
            %strong Air Date:
            = @video.formated_air_date
          %li
            %strong External ID:
            = @video.external_id
          %li
            %strong Index Image
            = link_to 'View', @video.snapshot_index.image_url(:large)

- if policy(Upload).index?
  %section.uploads.col-10
    %h3 External Uploads
    .card.bg-light
      .card-body
        - if @uploads.empty?
          No External Uploads
        - @uploads.each do |upload|
          = link_to upload.host_provider.name, upload.url, class: 'btn btn-primary'

%section.metadata.col-10#metadata
  %h3 Metadata
  .accordion
    - @video.file_metadata&.each do |section_name, section_content|
      .card.bg-light
        .card-header
          %h4
            %button.btn.btn-link.collapsed{type: 'button', data: {toggle: 'collapse', target: "##{section_name}-metadata"}, aria: { expanded: false, controls: "#{section_name}-metadata" }}
              = section_name.titleize
        .collapse{id: "#{section_name}-metadata", data: { parent: '#metadata' }}
          .card-body
{'fraction_non_alphanumeric': 0.13712930011862395, 'fraction_numerical': 0.0099644128113879, 'mean_word_length': 2.3890675241157555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '947685', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1421, 'n_words': 235}