2023-08-06_12-26-42Z_Sunday #2

Open
ken_fallon wants to merge 1 commits from 2023-08-06_12-23-20Z_Sunday_ken_test_mp3_rss_feed into master

View File

@ -1,22 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" >
<!--
SELECT hosts.host, eps.id, eps.series, eps.title, eps.notes, eps.date, hosts.email, eps.hostid, eps.explicit, eps.version, eps.valid, eps.duration, assets.size
FROM eps, hosts, assets
WHERE eps.valid=1
AND eps.hostid = hosts.hostid
AND eps.id = assets.episode_id
AND eps.duration > 0
AND assets.filename REGEXP "^hpr[0-9]+.mp3"
AND assets.extension = 'mp3'
AND eps.date <= UTC_DATE()
ORDER BY id DESC
LIMIT 10
--><channel>
Review

Block is not required

Block is not required
<rss version="2.0"
xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" >
<channel>
<title>Hacker Public Radio</title>
<link>https://hackerpublicradio.org/about.html</link>
<itunes:subtitle>A daily show hosted the community on topics that are of interest to hackers and hobbyists.</itunes:subtitle>
<description>Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.</description>
<link>https://www.hackerpublicradio.org/about.html</link>
<itunes:subtitle>A daily show hosted by the community on topics that are of interest to hackers and hobbyists.</itunes:subtitle>
<description>Hacker Public Radio is a podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that is of interest to hackers and hobbyists.</description>
<language>en-us</language>
<itunes:category text="Technology">
<itunes:category text="Tech News"/>
@ -24,7 +15,7 @@ LIMIT 10
<itunes:category text="Education">
<itunes:category text="Training"/>
</itunes:category>
<itunes:image href="http://hackerpublicradio.org/images/hpr_feed_itunes.png"/>
<itunes:image href="https://www.hackerpublicradio.org/images/hpr_feed_itunes.png"/>
<itunes:explicit>yes</itunes:explicit>
<itunes:author>Hacker Public Radio</itunes:author>
<itunes:keywords>Community Radio, Tech Interviews, Linux, Open, Hobby, Software Freedom</itunes:keywords>
@ -36,7 +27,7 @@ LIMIT 10
<itunes:email>admin@hackerpublicradio.org</itunes:email>
</itunes:owner>
<webMaster>admin@hackerpublicradio.org (HPR Volunteer)</webMaster>
<generator>kate</generator>
<generator>site-generator</generator>
<docs>http://www.rssboard.org/rss-specification</docs>
<ttl>43200</ttl>
<skipDays>
@ -44,29 +35,30 @@ LIMIT 10
<day>Sunday</day>
</skipDays>
<image>
<url>https://hackerpublicradio.org/images/hpr_feed_small.png</url>
<url>https://www.hackerpublicradio.org/images/hpr_feed_small.png</url>
<title>Hacker Public Radio</title>
<link>https://hackerpublicradio.org/about.html</link>
<link>https://www.hackerpublicradio.org/about.php</link>
Review

Needs to be fixed

Needs to be fixed
<description>The Hacker Public Radio Old Microphone Logo</description>
<height>164</height>
<width>144</width>
</image>
<googleplay:author>HPR Volunteer</googleplay:author>
<googleplay:description>Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.</googleplay:description>
<googleplay:description>Hacker Public Radio is a podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that is of interest to hackers and hobbyists.</googleplay:description>
<googleplay:email>admin@hackerpublicradio.org</googleplay:email>
<googleplay:image href="http://hackerpublicradio.org/images/hpr_feed_itunes.png"/>
<googleplay:image href="https://www.hackerpublicradio.org/images/hpr_feed_itunes.png"/>
<googleplay:category text="Technology"/>
<atom:link href="http://hackerpublicradio.org/hpr_mp3_rss.php" rel="self" type="application/rss+xml" />
<pubDate>Fri, 04 Aug 2023 00:00:00 +0000</pubDate>
<item>
<itunes:explicit>yes</itunes:explicit>
<googleplay:explicit>Yes</googleplay:explicit>
<title>HPR3915: Why the hell is my audio clipping?</title>
<atom:link href="https://www.hackerpublicradio.org/hpr_mp3.rss" rel="self" type="application/rss+xml" />
<pubDate>Fri, 04 Aug 2023 18:38:57 +0000</pubDate>
<item>
<itunes:explicit>yes</itunes:explicit>
<googleplay:explicit>yes</googleplay:explicit>
<title>HPR3915: Why the hell is my audio clipping?</title>
<author>mrxathpr.nospam@nospam.googlemail.com (MrX)</author>
<googleplay:author>mrxathpr.nospam@nospam.googlemail.com (MrX)</googleplay:author>
<itunes:author>mrxathpr.nospam@nospam.googlemail.com (MrX)</itunes:author>
<googleplay:image href="http://hackerpublicradio.org/images/hpr_feed_itunes.png"/>
<link>https://hackerpublicradio.org/eps/hpr3915/index.html</link>
<googleplay:image href="https://www.hackerpublicradio.org/images/hpr_feed_itunes.png"/>
<link>https://hackerpublicradio.org/eps/hpr3915/index.html</link>
<description><![CDATA[<p>This is an emergency show as we are short of shows. I was going to do
this show anyway as I noticed my audio was clipping on the last few
shows I sent in yet I didn't notice it on the files I sent to HPR.</p>
@ -76,39 +68,37 @@ amounts of attenuation each decrease in volume signified by a gong. I
hope this will allow me to stop the clipping from my audio.</p>
]]>
</description>
<itunes:summary><![CDATA[This is an emergency show as we are short of shows. I was going to do
<itunes:summary><![CDATA[<p>This is an emergency show as we are short of shows. I was going to do
this show anyway as I noticed my audio was clipping on the last few
shows I sent in yet I didn&#039;t notice it on the files I sent to HPR.
In this episode I waffle a bit and read out some of the stuff on the
shows I sent in yet I didn't notice it on the files I sent to HPR.</p>
<p>In this episode I waffle a bit and read out some of the stuff on the
HPR site about giving shows. During the recording I introduce increasing
amounts of attenuation each decrease in volume signified by a gong. I
hope this will allow me to stop the clipping from my audio.
hope this will allow me to stop the clipping from my audio.</p>
]]>
</itunes:summary>
<pubDate>Fri, 04 Aug 2023 00:00:00 +0000</pubDate>
<enclosure url="http://hackerpublicradio.org/eps/hpr3915.mp3" length="7066294" type="audio/mpeg"/>
<guid>http://hackerpublicradio.org/eps/hpr3915.mp3</guid>
</item>
<item>
<itunes:explicit>no</itunes:explicit>
<googleplay:explicit>No</googleplay:explicit>
<title>HPR3914: how to deal with blisters</title>
<enclosure url="http://hackerpublicradio.org/eps/hpr3915.mp3" length="802000" type="audio/mpeg"/>
Review

This is serious - why are the sizes so different ?

This is serious - why are the sizes so different ?
Review

The size 7066294 is the one from the assets table. It's also the value stored in the IA entry (computed by the IA).

I don't know where the other value comes from, but will investigate.

The size 7066294 is the one from the `assets` table. It's also the value stored in the IA entry (computed by the IA). I don't know where the other value comes from, but will investigate.
Review

Found it. In templates/shared-item.tpl.xml there is the template code:

<enclosure url="http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %-->" length="<!--% episode.duration * 1000 %-->" type="audio/<!--% audio_mime_type %-->"/>

So the 1000 * duration (in seconds?) is used for the length in bytes.

Found it. In `templates/shared-item.tpl.xml` there is the template code: ``` <enclosure url="http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %-->" length="<!--% episode.duration * 1000 %-->" type="audio/<!--% audio_mime_type %-->"/> ``` So the 1000 * duration (in seconds?) is used for the length in bytes.
Review
echo "    <enclosure url=\"$url\" length=\"$length\" type=\"$mimetype\"/>\n";

www/rss.php Line 291 in 9b47c97e71
echo " <enclosure url=\"$url\" length=\"$length\" type=\"$mimetype\"/>\n";

Length comes from

$length = $row['size'];

www/rss.php Line 290 in 9b47c97e71
$length = $row['size'];

type comes from the feed type - so
mp3 $mimetype = "audio/mpeg";
ogg $mimetype = "audio/ogg";
spx $mimetype = "audio/ogg";

``` echo " <enclosure url=\"$url\" length=\"$length\" type=\"$mimetype\"/>\n"; ```` https://repo.anhonesthost.net/HPR/hpr_hub/src/commit/9b47c97e71ae69d2d08cc0b47ccfbc6509101ac6/www/rss.php#L291 Length comes from ``` $length = $row['size']; ``` https://repo.anhonesthost.net/HPR/hpr_hub/src/commit/9b47c97e71ae69d2d08cc0b47ccfbc6509101ac6/www/rss.php#L290 type comes from the feed type - so mp3 $mimetype = "audio/mpeg"; ogg $mimetype = "audio/ogg"; spx $mimetype = "audio/ogg";
<guid>http://hackerpublicradio.org/eps/hpr3915.mp3</guid>
</item><item>
<itunes:explicit>no</itunes:explicit>
<googleplay:explicit>no</googleplay:explicit>
<title>HPR3914: how to deal with blisters</title>
<author>dnt.nospam@nospam.revolto.net (dnt)</author>
<googleplay:author>dnt.nospam@nospam.revolto.net (dnt)</googleplay:author>
<itunes:author>dnt.nospam@nospam.revolto.net (dnt)</itunes:author>
<googleplay:image href="http://hackerpublicradio.org/images/hpr_feed_itunes.png"/>
<link>https://hackerpublicradio.org/eps/hpr3914/index.html</link>
<googleplay:image href="https://www.hackerpublicradio.org/images/hpr_feed_itunes.png"/>
<link>https://hackerpublicradio.org/eps/hpr3914/index.html</link>
<description><![CDATA[<p>Many years ago, my father taught me how to deal with blisters using a
needle and thread.</p>
]]>
</description>
<itunes:summary><![CDATA[Many years ago, my father taught me how to deal with blisters using a
needle and thread.
<itunes:summary><![CDATA[<p>Many years ago, my father taught me how to deal with blisters using a
needle and thread.</p>
]]>
</itunes:summary>
<pubDate>Thu, 03 Aug 2023 00:00:00 +0000</pubDate>
<enclosure url="http://hackerpublicradio.org/eps/hpr3914.mp3" length="2748583" type="audio/mpeg"/>
<guid>http://hackerpublicradio.org/eps/hpr3914.mp3</guid>
</item>
</channel>
<enclosure url="http://hackerpublicradio.org/eps/hpr3914.mp3" length="262000" type="audio/mpeg"/>
<guid>http://hackerpublicradio.org/eps/hpr3914.mp3</guid>
</item></channel>
</rss>