This is a revision to pull request #1205 which tries to avoid returning
duplicate results from multiple providers.
Duplicates are eliminated in two stages:
* Check for duplicate provider ids
* In case of movies and series: Also remove duplicates by title/year
combination
The second stage is required because search results of themoviedb and
thetvdb do not contain external ids and performing separate queries for
each individual result would be too expensive. This is not an ideal
solution, but Name/Year is anyway just exactly that information which is
presented to the client in the results - apart from the image, of
course.
Images are only aggregated on matching provider ids, though. To allow
image aggregation over all search results, the breaking condition once
the result list is full has been removed..
Previously, when a remote search (without provider restriction) was
executed, the search used results from the first provider that returned
at least a single result only. Other providers are ignored.
This commit changes the behaviour in a way that all available providers
are queried until a certain number of search results has been collected.
The number is hardcoded to 10 (like it was before), but could be
parametrized in the future.