mlj / castget

A simple, command-line based RSS enclosure downloader, primarily intended for automatic, unattended downloading of podcasts.
http://castget.johndal.com
GNU General Public License v2.0
103 stars 23 forks source link

fileextension not added for custom filenames #38

Open L0ric0 opened 4 years ago

L0ric0 commented 4 years ago

when using a custom filename template the fileextenstion is not added.

spencerhughes commented 4 years ago

Even just having a %(filextension) template option would be awesome.

mlj commented 3 years ago

Agree this is really dumb. As usual, there are a few options, in increasing order of complexity:

  1. We can peek at the filenames in the feed and use whatever extension is there.
  2. We can look at the media type in the HTTP response and try to determine the extension from there.
  3. We can try to look at the file itself and have a guess.

Option 1 is very simple but not very robust. Still, I think it is better than the current situation, so it may be worth starting with that.

Spacewalker2 commented 2 years ago

Maybe it could be as simple as extension=opus or ext=opus. So the https://example.com/episodeX.opus gets downloaded instead of https://example.com/episodeX.mp3 which is the one in the feed.