ribbons / RadioDownloader

An easy to use application for managing podcast subscriptions and downloads.
https://nerdoftheherd.com/tools/radiodld/
GNU General Public License v3.0
15 stars 11 forks source link

Linux: Changed download filename character replacement list to prevent interoperability issues #238

Closed ribbons closed 4 years ago

ribbons commented 4 years ago

Radio Downloader uses the array returned by Path.GetInvalidFileNameChars (minus Path.DirectorySeparatorChar) to decide what should be removed from the generated download filenames. Under Windows this means that <>:"/|?* and ASCII 0-31 are removed but under Linux only ASCII 0 is removed.

This works perfectly well under Linux as the OS is much more permissive about filename characters but causes some interoperability issues - two that I have encountered are:

  1. Accessing the downloaded files over a Samba share either displays mangled names or causes them to not appear at all (depending on Samba configuration).
  2. Files containing : downloaded from the Radio Downloader podcast feed by Podcast Addict under Android cannot be played.

I suspect there would also be a problem attempting to save the downloaded files onto a mounted Windows SMB share without mapposix (or similar) enabled.

To resolve these interoperability problems, I suggest removing the same characters from generated filenames under Linux as Windows.