An .url file would lead to a crash due to codectype being null. This
is fixed with this commit, but at the same time support for these
files is completely removed, since even with the bug fixed .url
(and .pls) files would not stream.
artist_sort tends to be more and more widespread, so try to reuse artist_sort
if possible instead of deriving album_artist_sort from album_artist
unconditionally.
ffmpeg has issues with DRM-afflicted files, leading to the files being
tagged with the unknown file type. This allows streaming those DRM-afflicted
files to iTunes.
Do not proceed and scan the file with ffmpeg on error, bail out. Doing so,
don't free strings allocated inside the mfi as we'll call free_mfi() anyway.
Reported by Kai Elwert.
Songs in a compilation must all have the same album_artist and album (due to
songalbumid); if a song in a compilation doesn't have an album_artist, set it
to an empty string instead of defaulting to the value of artist. This is less
likely to break the compilation.
It is now clear that multi-library support will not happen, so remove whatever
provisions were in the code for that.
It comes with a small change to the configuration file, too.
With this, DB schema version went to 9.
Store groups (only album groups supported at the moment) in the DB,
so their ids are persistent for the duration of the forked-daapd session.
Those ids are used to, among other things, retrieve artwork, so we must
provide ourselves some persistence here.
This brings us to schema version 8.
Due to the two Murmur64 implementations for 64 and 32bit machines, the
hash is not compatible when moving the SQLite DB between 32/64 bit hosts.
So we'll recompute all the songalbumids at startup, just in case.
eventfd has less overhead than a pipe, works as a counter and uses a
single fd. Use it on Linux if available (that should be pretty much
always given the glibc and kernel requirements).
The filescanner dereferences symlinks as it encounters them, but it did
not dereference the top-level library directories given in the config.
Also the playlist scanner always dereferences the filenames.
As a result, there was a mismatch between the paths in the files table and
the paths in the playlistitems table if the library directory given in the
config contain a symlink somewhere along the way.
Start replacing inotify in the filescanner with kqueue. Only a stub at
this point, kqueue/kevent doesn't deliver nearly as much information
as inotify does. This will require some work, and someone willing to
do that work.
When receiving IN_CREATE or IN_MODIFY, there's no guarantee the file is
in its final state. Similarly, IN_MOVED_TO doesn't guarantee the file is
available when we receive it. And it actually isn't.
Watching for IN_CLOSE_WRITE fixes all that.