This gets the mime type using file-magic in a most minimal way. Since the python bindings have been available as a distro package for quite a while it is written in a way so it should also run on pre pypi installs of file-magic. This means not being able to use nice things like magic.detect_from_filename due to the fact that they where added rather recently (with recently being 2 years ago).
As the mime type is only used to check for wav files that mutagen can't handle it only reads the mime type and ignores the charset and other attributes that magic can find.
Due to the fact that file-magic is not properly unicode safe I'm checking the file based on it's first 2048 bytes as per <http://stackoverflow.com/questions/34836792/python-magic-cant-identify-unicode-filename#comment57418632_34838355>. This is not an issue since wav files need to start with a wav header by definition anyway.
I tested this sucessfully on both CentOS and Debian with files containing Unicode in their names.
Legacy upstream had a weird way of doing this that could lead to empty files being requested with a range header that did not match what was available on the server. I'm assuming this code used to work aroud some media-monitor feature that has been since refactored into analyzer which handles these cases properly.
Address issue #141 so Git cloning under Windows preserves line endings of relevant scripts and files regardless of a user's local Git configuration so it's possible to provision a VM with Vagrant, install and run LibreTime in place without issue.
As per the liquidsoap docs the file is loaded per default anyhow http://savonet.sourceforge.net/doc-svn/script_loading.html.
I think the output.shoutcast might be the only place where we really use it though. Testing this against shoutcast would be nice, but I don't have one and am not sure how relevant it still is.
This is a workaround to make updating easier for folks who do not re-install. A proper solution would get rid of most of the Config class and use something based on Zend_Config_Ini instead. It would also have some sensible defaults in the code and nor error when new values get added.