<commit_before>﻿using System;
using System.Collections.Generic;
using System.Net;
using JabbR.ContentProviders.Core;

namespace JabbR.ContentProviders
{
    public class AduioContentProvider : CollapsibleContentProvider
    {
        private static readonly HashSet<string> _audioMimeTypes = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {
            "audio/mpeg",
            "audio/x-wav",
            "aduio/ogg"
        };

        protected override ContentProviderResultModel GetCollapsibleContent(HttpWebResponse response)
        {
            return new ContentProviderResultModel()
             {
                 Content = String.Format(@"<audio controls=""controls"" src=""{0}"">Your browser does not support the audio tag.</audio>", response.ResponseUri),
                 Title = response.ResponseUri.AbsoluteUri.ToString()
             };
        }

        protected override bool IsValidContent(HttpWebResponse response)
        {
            return !String.IsNullOrEmpty(response.ContentType) &&
                    _audioMimeTypes.Contains(response.ContentType);

        }
    }
}<commit_msg>Changing the Audio Content Provider to not be collapsible, as doing that made it twice as tall.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Net;
using JabbR.ContentProviders.Core;

namespace JabbR.ContentProviders
{
    public class AduioContentProvider : IContentProvider
    {
        private static readonly HashSet<string> _audioMimeTypes = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {
            "audio/mpeg",
            "audio/x-wav",
            "aduio/ogg"
        };

        protected bool IsValidContent(HttpWebResponse response)
        {
            return !String.IsNullOrEmpty(response.ContentType) &&
                    _audioMimeTypes.Contains(response.ContentType);

        }

        public ContentProviderResultModel GetContent(HttpWebResponse response)
        {
            if (IsValidContent(response))
            {
                return new ContentProviderResultModel()
                {
                    Content = String.Format(@"<audio controls=""controls"" src=""{0}"">Your browser does not support the audio tag.</audio>", response.ResponseUri),
                    Title = response.ResponseUri.AbsoluteUri.ToString()
                };
            }
            return null;
        }
    }
}
{'fraction_non_alphanumeric': 0.08817384036773925, 'fraction_numerical': 0.0008357709987463436, 'mean_word_length': 2.371830985915493, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '816467', 'n_tokens_mistral': 601, 'n_tokens_neox': 587, 'n_words': 126}