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
Owner
No description provided.
ken_fallon added 1 commit 2023-08-06 12:27:21 +00:00
ken_fallon reviewed 2023-08-06 12:28:24 +00:00
@ -12,4 +2,0 @@
AND eps.date <= UTC_DATE()
ORDER BY id DESC
LIMIT 10
--><channel>
Author
Owner

Block is not required

Block is not required
ken_fallon reviewed 2023-08-06 12:29:11 +00:00
@ -48,2 +38,3 @@
<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>
Author
Owner

Needs to be fixed

Needs to be fixed
ken_fallon reviewed 2023-08-06 13:24:08 +00:00
@ -93,3 +81,1 @@
<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"/>
Author
Owner

This is serious - why are the sizes so different ?

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

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.
Owner

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.
Author
Owner
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";
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 2023-08-06_12-23-20Z_Sunday_ken_test_mp3_rss_feed:2023-08-06_12-23-20Z_Sunday_ken_test_mp3_rss_feed
git checkout 2023-08-06_12-23-20Z_Sunday_ken_test_mp3_rss_feed
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: HPR/Documentation#2
No description provided.