<commit_before>﻿@model RedFolder.com.ViewModels.Podcast

@{
    ViewBag.Title = Model.Item.Title;
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.BodyCssClass = "new2-css";
    ViewBag.DropContainerFluid = true;
}

<div class="rfc-header home-page">
    <h1>@Model.Item.Title</h1>
</div>

<div class="podcast-episodes container">
    <div class="row">
        <div class="col-xs-12">
            <p><strong>@Html.Raw(Model.Item.Description)</strong></p>

            @{
                var rssItem = Model.Item.SpecificItem as CodeHollow.FeedReader.Feeds.Rss20FeedItem;
                if (rssItem != null)
                {
                    var url = RedFolder.Utils.SafeUrl.MakeSafe(Model.Item.Title);

                    if (!string.IsNullOrEmpty(rssItem?.Enclosure?.Url))
                    {
                        <p class="read-more">
                            <audio id="podcast-player"
                                   class="podcast-player" 
                                   controls="controls" 
                                   src="@rssItem.Enclosure.Url" 
                                   preload="none">
                                <a href="@Model.Item.Link">
                                    Listen now&nbsp;&nbsp;<i class="fa fa-chevron-circle-right"></i>
                                </a>
                            </audio>
                        </p>
                        <p>Or listen at:</p>
                        <p>
                            @Html.Partial("_PodcastersList")
                        </p>
                    }
                    else
                    {
                        <p class="read-more">
                            <a href="@Model.Item.Link">
                                Listen now&nbsp;&nbsp;<i class="fa fa-chevron-circle-right"></i>
                            </a>
                        </p>
                    }
                }
            }

            <p><i>Published: @Model.Item.PublishingDateString</i></p>

            @if (!string.IsNullOrEmpty(Model.ShowNotes))
            {
                @Html.Raw(Model.ShowNotes)
            }
        </div>
    </div>
</div>

@section metas
    {
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:site" content="@@RedFolderMark" />
    <meta property="og:title" name="twitter:title" content="@Model.Item.Title" />
    <meta property="og:description" name="twitter:description" content="@Model.Item.Description" />
    <meta property="og:image" name="twitter:image" content="https://red-folder.com/images/PodcastLogo.png" />
}

@section Scripts
    {
    <script type="application/ld+json">
        {
        "@@context": "http://schema.org/",
        "@@type": "PodcastEpisode",
        "url": "https://www.red-folder.com/podcasts/@RedFolder.Utils.SafeUrl.MakeSafe(Model.Item.Title)",
        "name": "@Model.Item.Title",

        "datePublished": "@Model.Item.PublishingDate?.ToString("yyyy-MM-dd")",
        "dateCreated": "@Model.Item.PublishingDate?.ToString("yyyy-MM-dd")",
        "dateModified": "@Model.Item.PublishingDate?.ToString("yyyy-MM-dd")",
        "description": "@Model.Item.Description",

        "associatedMedia": {
        "@@type": "MediaObject",
        "contentUrl": "@((Model.Item.SpecificItem as CodeHollow.FeedReader.Feeds.Rss20FeedItem).Enclosure.Url)"
        },

        "partOfSeries": {
        "@@type": "PodcastSeries",
        "name": "Better ROI from Software Development ",
        "url": "https://red-folder.com/podcasts"
        },

        "image": {
        "@@type": "ImageObject",
        "url": "https://red-folder.com/images/PodcastLogo.png",
        "height": "150",
        "width": " 280"
        },

        "publisher": {
        "@@type": "Organization",
        "name": "Red Folder Consultancy Ltd",
        "logo": {
        "@@type": "ImageObject",
        "url": "https://www.red-folder.com/media/RFCLogo.png"
        }
        },

        "author": {
        "@@type": "Person",
        "name": "<NAME>"
        }
        }
    </script>

    <script>
        var audio = document.getElementById("podcast-player");
        audio.onplay = function () {
            dataLayer.push({
                event: "podcast.play",
                podcastEpisode: "@Model.Item.Title"
            });
        };
    </script>
}<commit_msg>Fix for the event listener and changed the auto to load just the metadata<commit_after>﻿@model RedFolder.com.ViewModels.Podcast

@{
    ViewBag.Title = Model.Item.Title;
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.BodyCssClass = "new2-css";
    ViewBag.DropContainerFluid = true;
}

<div class="rfc-header home-page">
    <h1>@Model.Item.Title</h1>
</div>

<div class="podcast-episodes container">
    <div class="row">
        <div class="col-xs-12">
            <p><strong>@Html.Raw(Model.Item.Description)</strong></p>

            @{
                var rssItem = Model.Item.SpecificItem as CodeHollow.FeedReader.Feeds.Rss20FeedItem;
                if (rssItem != null)
                {
                    var url = RedFolder.Utils.SafeUrl.MakeSafe(Model.Item.Title);

                    if (!string.IsNullOrEmpty(rssItem?.Enclosure?.Url))
                    {
                        <p class="read-more">
                            <audio id="podcast-player"
                                   class="podcast-player" 
                                   controls="controls" 
                                   src="@rssItem.Enclosure.Url" 
                                   preload="metadata">
                                <a href="@Model.Item.Link">
                                    Listen now&nbsp;&nbsp;<i class="fa fa-chevron-circle-right"></i>
                                </a>
                            </audio>
                        </p>
                        <p>Or listen at:</p>
                        <p>
                            @Html.Partial("_PodcastersList")
                        </p>
                    }
                    else
                    {
                        <p class="read-more">
                            <a href="@Model.Item.Link">
                                Listen now&nbsp;&nbsp;<i class="fa fa-chevron-circle-right"></i>
                            </a>
                        </p>
                    }
                }
            }

            <p><i>Published: @Model.Item.PublishingDateString</i></p>

            @if (!string.IsNullOrEmpty(Model.ShowNotes))
            {
                @Html.Raw(Model.ShowNotes)
            }
        </div>
    </div>
</div>

@section metas
    {
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:site" content="@@RedFolderMark" />
    <meta property="og:title" name="twitter:title" content="@Model.Item.Title" />
    <meta property="og:description" name="twitter:description" content="@Model.Item.Description" />
    <meta property="og:image" name="twitter:image" content="https://red-folder.com/images/PodcastLogo.png" />
}

@section Scripts
    {
    <script type="application/ld+json">
        {
        "@@context": "http://schema.org/",
        "@@type": "PodcastEpisode",
        "url": "https://www.red-folder.com/podcasts/@RedFolder.Utils.SafeUrl.MakeSafe(Model.Item.Title)",
        "name": "@Model.Item.Title",

        "datePublished": "@Model.Item.PublishingDate?.ToString("yyyy-MM-dd")",
        "dateCreated": "@Model.Item.PublishingDate?.ToString("yyyy-MM-dd")",
        "dateModified": "@Model.Item.PublishingDate?.ToString("yyyy-MM-dd")",
        "description": "@Model.Item.Description",

        "associatedMedia": {
        "@@type": "MediaObject",
        "contentUrl": "@((Model.Item.SpecificItem as CodeHollow.FeedReader.Feeds.Rss20FeedItem).Enclosure.Url)"
        },

        "partOfSeries": {
        "@@type": "PodcastSeries",
        "name": "Better ROI from Software Development ",
        "url": "https://red-folder.com/podcasts"
        },

        "image": {
        "@@type": "ImageObject",
        "url": "https://red-folder.com/images/PodcastLogo.png",
        "height": "150",
        "width": " 280"
        },

        "publisher": {
        "@@type": "Organization",
        "name": "Red Folder Consultancy Ltd",
        "logo": {
        "@@type": "ImageObject",
        "url": "https://www.red-folder.com/media/RFCLogo.png"
        }
        },

        "author": {
        "@@type": "Person",
        "name": "<NAME>"
        }
        }
    </script>

    <script>
        document.addEventListener("DOMContentLoaded", function () {
            document.getElementById("podcast-player").onplay = function () {
                dataLayer.push({
                    event: "podcast.play",
                    podcastEpisode: "@Model.Item.Title"
                });
            };
        });
    </script>
}
{'fraction_non_alphanumeric': 0.15549567755697766, 'fraction_numerical': 0.003368137420006736, 'mean_word_length': 1.5008422234699608, 'pattern_counts': {'":': 58, '<': 95, '<?xml version=': 0, '>': 95, 'https://': 10, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4619777', 'n_tokens_mistral': 2627, 'n_tokens_neox': 2467, 'n_words': 364}