mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 04:18:06 +02:00
update provider id queries
This commit is contained in:
parent
2979185d8e
commit
e50a74e35b
1 changed files with 8 additions and 5 deletions
|
@ -2749,17 +2749,20 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
|
|
||||||
if (query.HasImdbId.HasValue)
|
if (query.HasImdbId.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = 'Imdb'), '') <> '')");
|
var fn = query.HasImdbId.Value ? "<>" : "=";
|
||||||
|
whereClauses.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = 'Imdb'), '') " + fn + " '')");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.HasTmdbId.HasValue)
|
if (query.HasTmdbId.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = 'Tmdb'), '') <> '')");
|
var fn = query.HasTmdbId.Value ? "<>" : "=";
|
||||||
|
whereClauses.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = 'Tmdb'), '') " + fn + " '')");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.HasTvdbId.HasValue)
|
if (query.HasTvdbId.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = 'Tvdb'), '') <> '')");
|
var fn = query.HasTvdbId.Value ? "<>" : "=";
|
||||||
|
whereClauses.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = 'Tvdb'), '') " + fn + " '')");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.AlbumNames.Length > 0)
|
if (query.AlbumNames.Length > 0)
|
||||||
|
|
Loading…
Reference in a new issue