artwork_get() would return error for non-file images that shouldn't be
rescaled, which was a bit weird. This makes artwork_get() more straight-
forward.
Also fix issue #1139 simply by not calling artwork_get() in cases were
queue_item->artwork_url is an old temp file (in source_item_pipe_get).
This is an attempt to be nice to peers, so that we don't make many similar
requests to e.g. Discogs. This could happen via proces_items() for an album
where we have the same artwork url for each track, and if it was 404 we
would continue attempting the same request for each track.
Lower priority of potentielly slow embedded artwork retrieval, plus make sure
we tell the transcode module about http data kind, so that it can probe
quicker.
* Don't save artwork for permanent items (file + Spotify) to the stash. The
stash is only for short term artwork.
* If a request comes with a different max_w/max then search the online source
again.
* Make artwork requests thread-safe by mutex protecting the search history.
* Add config option
* Add system to avoid making too many futile requests + repeated requests
* Fixup Spotify artwork search (use type=track, type=album gave empty results)
* Include stash caching in artwork_get_byurl()
This implementation uses a tmpfile for storage of the artwork, plus it uses
artwork_get() which means that it scales the image as requested by the client.
It also does not create a tmpfile unless we actually receive artwork.
The previous solution would use subqueries to count the number of items and
streams in each playlist, which means that response time gets pretty slow if
there are many playlists.
This commit also includes a number of lesser db code changes.
This change is preparation to use ffmpeg's resampling capabilities to keep local
audio in sync (by up/downsampling slightly). This requires that sample rates are
not fixed for a transcode profile.
Added benefit of this is that we don't need quite as many xcode profiles.
Extends the http_client_ctx to hold the response code for a request.
Also adds the content type header, if it was a https request (using
libcurl instead of libevent)
Artwork in embedded files not showing up in non-legacy mode if the artwork does
not require rescaling. The bug is that we are by mistake sending a chunk of the
embedded file, not the artwork in it.
rescaling, meaning we can do without parallel ffmpeg interfaces.
This also moves artwork rescaling from libswscale to libavfilter, which
seems to fix a problem with PNG rescaling.
* [config] Added support for libav/ffmpeg dual installs
Reordered CPPFLAGS/LIBS so that library flags (includes etc) appear
ahead of prefix/global directives and the correct headers/libraries
are checked (if symbols are defined in alternative libraries).
Updated libav checks to use header declaration checks
rather than link checks (so differences between
libav/ffmpeg can be correctly found), and updated code references
to use new defines. Added support the alternate pkg-config
package names for libav. Updated ffmpeg vs libav check
to check MICRO version number (>=100 for ffmpeg). Simplified
resulting configure script by using a function to merge
CPPFLAGS variables.
* [config] Use FORKED_OPTS prefix for libevent_pthreads option
* [config] Add --with-libav option to select libav even if ffmpeg present