Skip to content

Feed XML sorting based on pubDate #133

Closed
@726a67

Description

@726a67

Certain podcast clients (e.g. Pocket Casts) have issues correctly parsing podcast entries when the provided XML feed does not sort items in descending order based on the entry pubDate.

Podsync's constructed XML feeds do not appear to sort based on pubDate, resulting in unpredictable feed parsing.

The ability to determine the order of the feed's entries based on a user-defined parameter (in this case, pubDate) should help maximize compatibility with podcast clients.

Example demonstrating current behavior:

config.toml

[feeds.PowerfulJRE]
  url = "https://youtube.com/channel/UCzQUP1qoWDoEbmsQxvdjxgQ"
  page_size = 5
  update_period = "120m"
  quality = "high"
  format = "video"
  max_height = 1080
  cron_schedule = "0 */2 * * *"
  clean = { keep_last = 5 }

PowerfulJRE.xml

<rss version="2.0">
<channel>
<title>PowerfulJRE</title>
<link>
https://youtube.com/channel/UCzQUP1qoWDoEbmsQxvdjxgQ
</link>
<description>The Joe Rogan Experience podcast</description>
<category>TV & Film</category>
<generator>
Podsync generator (support us at https://github.com/mxpv/podsync)
</generator>
<language>en-us</language>
<lastBuildDate>Wed, 22 Apr 2020 22:03:44 +0000</lastBuildDate>
<pubDate>Sat, 12 Jan 2013 01:40:14 +0000</pubDate>
<image>
<url>
https://yt3.ggpht.com/a/AATXAJzDO2W7yWrDalft2CtyJRWqaHNUp3cVDKaUQQ=s800-c-k-c0xffffffff-no-rj-mo
</url>
<title>PowerfulJRE</title>
<link>
https://youtube.com/channel/UCzQUP1qoWDoEbmsQxvdjxgQ
</link>
</image>
<itunes:author>PowerfulJRE</itunes:author>
<itunes:subtitle>PowerfulJRE</itunes:subtitle>
<itunes:summary>The Joe Rogan Experience podcast</itunes:summary>
<itunes:image href="https://yt3.ggpht.com/a/AATXAJzDO2W7yWrDalft2CtyJRWqaHNUp3cVDKaUQQ=s800-c-k-c0xffffffff-no-rj-mo"/>
<itunes:explicit>no</itunes:explicit>
<itunes:category text="TV & Film"/>
<item>
<guid>98mh3jxcuxI</guid>
<title>Joe Rogan Experience #1458 - Chris D'Elia</title>
<link>https://youtube.com/watch?v=98mh3jxcuxI</link>
<description>
Chris D’Elia is an actor, writer, and comedian. His new special “No Pain” is now streaming on Netflix and his podcast called “Congratulations” available on Apple Podcasts. @Chris D'Elia
</description>
<pubDate>Wed, 15 Apr 2020 19:00:07 +0000</pubDate>
<enclosure url="https://podsync.example.net/PowerfulJRE/98mh3jxcuxI.mp4" length="1601522700" type="video/mp4"/>
<itunes:author>PowerfulJRE</itunes:author>
<itunes:subtitle>Joe Rogan Experience #1458 - Chris D'Elia</itunes:subtitle>
<itunes:summary>
Chris D’Elia is an actor, writer, and comedian. His new special “No Pain” is now streaming on Netflix and his podcast called “Congratulations” available on Apple Podcasts. @Chris D'Elia
</itunes:summary>
<itunes:image href="https://i.ytimg.com/vi/98mh3jxcuxI/hqdefault.jpg"/>
<itunes:duration>2:50:10</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<itunes:order>0</itunes:order>
</item>
<item>
<guid>IXFlwSr5u_k</guid>
<title>Joe Rogan Experience #1460 - Donnell Rawlings</title>
<link>https://youtube.com/watch?v=IXFlwSr5u_k</link>
<description> </description>
<pubDate>Fri, 17 Apr 2020 19:00:05 +0000</pubDate>
<enclosure url="https://podsync.example.net/PowerfulJRE/IXFlwSr5u_k.mp4" length="3168862533" type="video/mp4"/>
<itunes:author>PowerfulJRE</itunes:author>
<itunes:subtitle>Joe Rogan Experience #1460 - Donnell Rawlings</itunes:subtitle>
<itunes:summary/>
<itunes:image href="https://i.ytimg.com/vi/IXFlwSr5u_k/hqdefault.jpg"/>
<itunes:duration>3:01:25</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<itunes:order>1</itunes:order>
</item>
<item>
<guid>J36xPWBLcG8</guid>
<title>Joe Rogan Experience #1459 - Tom O'Neill</title>
<link>https://youtube.com/watch?v=J36xPWBLcG8</link>
<description>
Tom O’Neill is an award-winning investigative journalist and entertainment reporter whose work has appeared in national publications such as Us, Premiere, New York, The Village Voice and Details. His book, Chaos: Charles Manson, the CIA, and the Secret History of the Sixties (https://amzn.to/2RGhdQM) was published by Little, Brown in the summer of 2019.
</description>
<pubDate>Thu, 16 Apr 2020 19:00:08 +0000</pubDate>
<enclosure url="https://podsync.example.net/PowerfulJRE/J36xPWBLcG8.mp4" length="5375621204" type="video/mp4"/>
<itunes:author>PowerfulJRE</itunes:author>
<itunes:subtitle>Joe Rogan Experience #1459 - Tom O'Neill</itunes:subtitle>
<itunes:summary>
Tom O’Neill is an award-winning investigative journalist and entertainment reporter whose work has appeared in national publications such as Us, Premiere, New York, The Village Voice and Details. His book, Chaos: Charles Manson, the CIA, and the Secret History of the Sixties (https://amzn.to/2RGhdQM) was published by Little, Brown in the summer of 2019.
</itunes:summary>
<itunes:image href="https://i.ytimg.com/vi/J36xPWBLcG8/hqdefault.jpg"/>
<itunes:duration>2:55:05</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<itunes:order>2</itunes:order>
</item>
<item>
<guid>cF7_AaY9tCg</guid>
<title>JRE MMA Show #94 with Brendan Schaub</title>
<link>https://youtube.com/watch?v=cF7_AaY9tCg</link>
<description>
Joe sits down with with Brendan Schaub to discuss the "upcoming" fights. @The Fighter and The Kid​
</description>
<pubDate>Fri, 10 Apr 2020 19:00:08 +0000</pubDate>
<enclosure url="https://podsync.example.net/PowerfulJRE/cF7_AaY9tCg.mp4" length="1938810334" type="video/mp4"/>
<itunes:author>PowerfulJRE</itunes:author>
<itunes:subtitle>JRE MMA Show #94 with Brendan Schaub</itunes:subtitle>
<itunes:summary>
Joe sits down with with Brendan Schaub to discuss the "upcoming" fights. @The Fighter and The Kid​
</itunes:summary>
<itunes:image href="https://i.ytimg.com/vi/cF7_AaY9tCg/hqdefault.jpg"/>
<itunes:duration>3:17:13</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<itunes:order>3</itunes:order>
</item>
<item>
<guid>ig9yh8iVZWI</guid>
<title>Joe Rogan Experience #1457 - Tim Dillon</title>
<link>https://youtube.com/watch?v=ig9yh8iVZWI</link>
<description>
Tim Dillon is a comedian, tour guide, and host. His podcast “The Tim Dillon Show” is available on YouTube & Apple Podcasts. @The Tim Dillon Show
</description>
<pubDate>Tue, 14 Apr 2020 19:00:10 +0000</pubDate>
<enclosure url="https://podsync.example.net/PowerfulJRE/ig9yh8iVZWI.mp4" length="1848671477" type="video/mp4"/>
<itunes:author>PowerfulJRE</itunes:author>
<itunes:subtitle>Joe Rogan Experience #1457 - Tim Dillon</itunes:subtitle>
<itunes:summary>
Tim Dillon is a comedian, tour guide, and host. His podcast “The Tim Dillon Show” is available on YouTube & Apple Podcasts. @The Tim Dillon Show
</itunes:summary>
<itunes:image href="https://i.ytimg.com/vi/ig9yh8iVZWI/hqdefault.jpg"/>
<itunes:duration>3:01:22</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<itunes:order>4</itunes:order>
</item>
<item>
<guid>mrNZUaaaEtI</guid>
<title>Joe Rogan Experience #1461 - Owen Smith</title>
<link>https://youtube.com/watch?v=mrNZUaaaEtI</link>
<description>
Owen Smith is a comedian, writer, actor and television producer. Check out his new show "Notebooks" available now on YouTube. https://www.youtube.com/owensmithtv @Owen Smith Comedy
</description>
<pubDate>Wed, 22 Apr 2020 19:00:11 +0000</pubDate>
<enclosure url="https://podsync.example.net/PowerfulJRE/mrNZUaaaEtI.mp4" length="2986828919" type="video/mp4"/>
<itunes:author>PowerfulJRE</itunes:author>
<itunes:subtitle>Joe Rogan Experience #1461 - Owen Smith</itunes:subtitle>
<itunes:summary>
Owen Smith is a comedian, writer, actor and television producer. Check out his new show "Notebooks" available now on YouTube. https://www.youtube.com/owensmithtv @Owen Smith Comedy
</itunes:summary>
<itunes:image href="https://i.ytimg.com/vi/mrNZUaaaEtI/hqdefault.jpg"/>
<itunes:duration>2:51:32</itunes:duration>
<itunes:explicit>no</itunes:explicit>
<itunes:order>5</itunes:order>
</item>
</channel>
</rss>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-feedArea: iTunes XML feedC-bugCategory: This is a bugP-highHigh priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions