- Calculate size for both formats (+ move the return to transcode_encode_query)
- Let transcode_needed() decide what format to output
- Determine content-type from transcoding type
- Add transcode-dependent ability to override file metadata in rsp/daap
- Send file size matching format
This change allows to reuse curl handles for multiple requests.
Reusing a curl handle improves performance if more than one request is
made against a service (connection, session cache, dns cache are kept
between requests).
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)