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.
In my configuration, the Omdb provider is the first in the list for
movie metadata. This was the default at the time I installed MB and I
never changed that (don't know what the current defaults are for a new
installation).
When I use the identify command for movies in the metadata editor, I
always get a single result only. This is due to the fact that the Omdb
provider used the title API with "t=moviename", while there is also a
search api with "s=moviename" which will return multiple results.
This commit modifies the OmdbItemProvider to use the search API variant
and enable returning multiple results