[Bug]: Non mp3 podcast files get saved as mp3 #963

Closed
opened 2026-04-24 23:27:45 +02:00 by adam · 4 comments
Owner

Originally created by @fheusel on GitHub (Feb 17, 2023).

Describe the issue

Podcast files that are not delivered as mp3, but for example as m4a, will still be saved as mp3.
If you then create your own RSS feed of them, they are of course served as mp3 with type="audio/mpeg", which for example the podcast client Castro is unable to play.
Apparently responsible for this is the following source code line, which hardcoded the file extension:
server/objects/PodcastEpisodeDownload.js#L38

Steps to reproduce the issue

  1. Subscribe to a m4a feed
    e.g. https://forschergeist.de/feed/m4a/, which serves the first episode as:
    <enclosure url="https://forschergeist.de/podlove/file/9/s/feed/c/m4a/fg001-geschichte-der-wissenschaften.m4a" length="81348739" type="audio/mp4"/>
  2. Download some episodes
  3. Publish/open RSS feed and look at it
    the episode is served as <enclosure url="https://<redacted>/FG001 Geschichte der Wissenschaften.mp3" length="81348739" type="audio/mpeg"/>

Audiobookshelf version

v2.2.15

How are you running audiobookshelf?

Docker

Originally created by @fheusel on GitHub (Feb 17, 2023). ### Describe the issue Podcast files that are not delivered as mp3, but for example as m4a, will still be saved as mp3. If you then create your own RSS feed of them, they are of course served as mp3 with `type="audio/mpeg"`, which for example the podcast client [Castro](https://castro.fm) is unable to play. Apparently responsible for this is the following source code line, which hardcoded the file extension: [server/objects/PodcastEpisodeDownload.js#L38](https://github.com/advplyr/audiobookshelf/blob/master/server/objects/PodcastEpisodeDownload.js#L38) ### Steps to reproduce the issue 1. Subscribe to a m4a feed e.g. [https://forschergeist.de/feed/m4a/](https://forschergeist.de/feed/m4a/), which serves the first episode as: `<enclosure url="https://forschergeist.de/podlove/file/9/s/feed/c/m4a/fg001-geschichte-der-wissenschaften.m4a" length="81348739" type="audio/mp4"/>` 2. Download some episodes 3. Publish/open RSS feed and look at it the episode is served as `<enclosure url="https://<redacted>/FG001 Geschichte der Wissenschaften.mp3" length="81348739" type="audio/mpeg"/>` ### Audiobookshelf version v2.2.15 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:27:45 +02:00
adam closed this issue 2026-04-24 23:27:46 +02:00
Author
Owner

@advplyr commented on GitHub (Mar 19, 2023):

Fixed in v2.2.17

@advplyr commented on GitHub (Mar 19, 2023): Fixed in [v2.2.17](https://github.com/advplyr/audiobookshelf/releases/tag/v2.2.17)
Author
Owner

@MoSattler commented on GitHub (Nov 23, 2023):

Hey @fheusel - sorry for the offtopic, but I am curious how you managed to get Castro to subscribe to the podcasts in the first place? For some reason, Castro never seems to find the podcast when using the Audiobookshelf rss links (while other players have to issue).

@MoSattler commented on GitHub (Nov 23, 2023): Hey @fheusel - sorry for the offtopic, but I am curious how you managed to get Castro to subscribe to the podcasts in the first place? For some reason, Castro never seems to find the podcast when using the Audiobookshelf rss links (while other players have to issue).
Author
Owner

@fheusel commented on GitHub (Nov 23, 2023):

Hi @MoSattler. It just works. I'm pasting the Audiobookshelf rss link into Castros search field in the "Discover" tab (the field is labeled "Search directory or enter URL") and then press "search" – a progress spinner appears and after a few seconds it shows the podcast ready to subscribe.
Maybe Castros server-side indexing is somehow not able to connect to your Audiobookshelf instance?
I have a Caddy server in front of Audiobookshelf as a reverseproxy which also handles HTTPS using Let's Encrypt for me:

audiobookshelf.example.com {
    encode gzip zstd
    reverse_proxy http://localhost:1234
}
@fheusel commented on GitHub (Nov 23, 2023): Hi @MoSattler. It just works. I'm pasting the Audiobookshelf rss link into Castros search field in the "Discover" tab (the field is labeled "Search directory or enter URL") and then press "search" – a progress spinner appears and after a few seconds it shows the podcast ready to subscribe. Maybe Castros server-side indexing is somehow not able to connect to your Audiobookshelf instance? I have a [Caddy server](https://caddyserver.com) in front of Audiobookshelf as a reverseproxy which also handles HTTPS using Let's Encrypt for me: ``` audiobookshelf.example.com { encode gzip zstd reverse_proxy http://localhost:1234 } ```
Author
Owner

@MoSattler commented on GitHub (Nov 23, 2023):

Hey @fheusel, thanks for the quick answer!

The problem was indeed that my server is only serving within my Tailscale network. Which is fine for most applications. But it looks like Castro needs public access. I am guessing that their server somehow needs access to the feed. I now used a Tailscale funnel to expose my Audiobookshelf instance to the public internet, and it works.

@MoSattler commented on GitHub (Nov 23, 2023): Hey @fheusel, thanks for the quick answer! The problem was indeed that my server is only serving within my Tailscale network. Which is fine for most applications. But it looks like Castro needs public access. I am guessing that their server somehow needs access to the feed. I now used a Tailscale funnel to expose my Audiobookshelf instance to the public internet, and it works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#963