Podcastindex-org / docs-api

Developer documentation for the podcastindex.org api.
https://podcastindex-org.github.io/docs-api/
MIT License
54 stars 30 forks source link

Order `/episodes/live` by `datePublished` rather than `id` #96

Open ericpp opened 1 year ago

ericpp commented 1 year ago

The /episodes/live endpoint seems to be ordered by the id field, which leads to strange ordering with some podcasts. In the attached example, you can see that the MMO Show live item has a really low id compared to other items and appears at the bottom of the list below items that were less recently updated.

I'm wondering if this id behavior is caused by some podcasts choosing to keep live item tags in their feeds rather than removing and adding them between shows. I assume that the code will preserve ids for live tags it has seen before and only assign new ids to new tags. That could explain why MMO has a low numbered id and why it is generally towards the bottom of the live episode list.

Switching the order to datePublished in reverse chronological order would avoid this issue and always put recently updated items at the top of the list

live.json.txt

daveajones commented 1 year ago

10-4. Will investigate this and change as appropriate.