I’ve been toying with a small Django project that can be given a list of podcast feeds, and then regularly checks those feeds to update some interesting metrics. Initially, I wanted to see how many comparable podcasts to my own made use of various RSS namespace elements,1 and also to pull some aggregate statistics around release frequency, episode length, etc.2
Since I was making a simple UI for myself, I decided to add in the ability to fetch and cache cover art of the podcast, updating it if the URL changes in subsequent checks. And here I noticed something odd. I was limiting the mime types that would be accepted in case garbage data was returned,3 but then I noticed that two podcasts in my initial set were never caching the artwork, even though the secondary checks on the file itself appeared showed valid types! When I dug deeper I found that the issue is with their hosts, which will happily return invalid or imprecise mime types in the Content-Type
header.
For example, if the cover art uploaded to Spotify/Anchor ends in .jpg
, it will deliver the file with mime type image/jpg
, which does not exist. It should be sending it back as image/jpeg
, and suggests to me they may be serving the designation by concatenating the file extension onto the the end of image/
, which strikes me as a really bad idea. Captivate.fm, on the other hand, doesn’t even try to do the right thing, and reports any file type as application/octet-stream
. 🤦
Now, I’m off to add some code to add a datapoint on these types of errors so that over time I can identify how many hosts are doing this!
UPDATE: Looks like Libsyn also does the application/octet-stream
thing.
Some examples include:
- iTunes feed type
- Season data
- Person elements for host/guest
- Transcript
- Funding
- Use of CW/TW in descriptions
- Explicit tags
- Uses RSS chapters for podcast
This is how I know as of when I’m writing this that if you were to listen to our podcast from start to finish without breaks, it would take you 9 days, 9 hours, 38 minutes, and 40 seconds. ↩︎
Smart thinking, Past Me! ↩︎