Forum

Thread tagged as: Problem, Podcasts
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. I'm not sure how I can help here.

Tim Rex

Tim Rex 0 points

Ok, I understand. Sorry for taking up so much of your time.

What I'm wondering is if there is any way that I can change the Perch templates, so that the audio file is served directly from the location where it gets uploaded, instead of using the URL that is generated by the htaccess file etc. That is all I can think doing now. Is that doable?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is that not what the most recent change was?

Tim Rex

Tim Rex 0 points

Ah, right. Sorry, I missed the point of changing to 'episodeFile'.

However, it still didn't work because it wasn't pulling in an absolute URL:

<item>
        <title>2 Testing, testing, longer audio</title>
        <itunes:author>Tim Rex</itunes:author>
        <itunes:subtitle><![CDATA[Longer audio file test.]]></itunes:subtitle>
        <itunes:summary><![CDATA[Longer audio file test.]]></itunes:summary>
        <itunes:image href="https://www.peterboroughtn.org/cms/resources/ptn-icon-1-w1400h1400.jpg" />
        <enclosure url="/cms/resources/podcast/talkingnews-test.mp3" length="40879384" type="audio/mpeg" />
        <guid>/cms/resources/podcast/talkingnews-test.mp3</guid>
        <pubDate>Tue, 18 Sep 2018 00:00:00 +0000</pubDate>
        <itunes:duration>00:24:52</itunes:duration>
    </item>

I've edited the template to include 'https://www.peterboroughtn.org' before '<perch:podcasts id="episodeFile" />' and it's now working:

<item>
        <title>2 Testing, testing, longer audio</title>
        <itunes:author>Tim Rex</itunes:author>
        <itunes:subtitle><![CDATA[Longer audio file test.]]></itunes:subtitle>
        <itunes:summary><![CDATA[Longer audio file test.]]></itunes:summary>
        <itunes:image href="https://www.peterboroughtn.org/cms/resources/ptn-icon-1-w1400h1400.jpg" />
        <enclosure url="https://www.peterboroughtn.org/cms/resources/podcast/talkingnews-test.mp3" length="40879384" type="audio/mpeg" />
        <guid>https://www.peterboroughtn.org/cms/resources/podcast/talkingnews-test.mp3</guid>
        <pubDate>Tue, 18 Sep 2018 00:00:00 +0000</pubDate>
        <itunes:duration>00:24:52</itunes:duration>
    </item>

Yay! Thanks for your help. Got there in the end.