Back to Top

Parsing problem with this feed?

4 posts / 0 new
Last post
Alan
Offline
Last seen: 11 years 5 months ago
Joined: 02/06/2009 - 18:27
Parsing problem with this feed?

One feed I added was http://rss-feed.s3.amazonaws.com/8779.xml which is a super cheezy happy hardcore set of new releases. I don't know exactly what they've done with the datestamps, but DC seems to be having a hard time figuring out what the last 10 episodes are. I think it went back to the beginning. Maybe DC assumes that people will put the newest ones on top, but these guys seem to put the new ones at the bottom.

The pubDate tags seem to be correct for each item tag (but in reversed order from normal), but there's no lastBuildDate in the channel tag just a pubDate like it was an item, and it lists it as some date in 1970. Is there any hope to sort this one out through some parsing magic by sorting on the actual contents of the pubDate tags rather than (I assume you're doing this) just picking off the top 10 from the XML?

eric
Offline
Last seen: 4 months 5 days ago
Joined: 11/06/2008 - 22:02
Sorting

DC is doing exactly what you are observing. Most (all that I have seen except for this one that you provide) podcasts add new episodes to the top.

This is good for a couple of reasons including optimizing the feed parsing. We normally don't do date sorting because parsing dates on android is *incredibly* slow, don't ask me why. We do sort in one special case but it's not common.

I could possibly add an option for a podcast for it to always sort on update. I can't make it the default, because it would make DC unusable in a lot of circumstances, but you could turn it on if you really wanted to.

I'll add this to the future feature list.

jkarp
Offline
Last seen: 9 years 5 months ago
Joined: 02/03/2009 - 15:36
Watch out because many feed

Watch out because many feed generator tools throw out invalid pubDate formats. It's supposed to be 3 character months - May, Jun, Jul, etc, but it's not uncommon to find feeds that use the full month name. Really hoses pubDate sorting. Drove me nuts in Yahoo Pipes.

eric
Offline
Last seen: 4 months 5 days ago
Joined: 11/06/2008 - 22:02
Thanks for the tip

There are all kinds of kooky thing in those dates. Some are missing completely, some feeds have all items with the same date. Date sorting is not a completely reliable way of doing this either.