mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
update db querying
This commit is contained in:
parent
b4ea519395
commit
1a00ac0bbe
5 changed files with 26 additions and 38 deletions
|
@ -259,7 +259,8 @@ namespace MediaBrowser.Api.Reports
|
||||||
MaxPlayers = request.MaxPlayers,
|
MaxPlayers = request.MaxPlayers,
|
||||||
MinCommunityRating = request.MinCommunityRating,
|
MinCommunityRating = request.MinCommunityRating,
|
||||||
MinCriticRating = request.MinCriticRating,
|
MinCriticRating = request.MinCriticRating,
|
||||||
ParentIndexNumber = request.ParentIndexNumber
|
ParentIndexNumber = request.ParentIndexNumber,
|
||||||
|
AiredDuringSeason = request.AiredDuringSeason
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(request.Ids))
|
if (!string.IsNullOrWhiteSpace(request.Ids))
|
||||||
|
@ -487,21 +488,6 @@ namespace MediaBrowser.Api.Reports
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.AiredDuringSeason.HasValue)
|
|
||||||
{
|
|
||||||
var episode = i as Episode;
|
|
||||||
|
|
||||||
if (episode == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Series.FilterEpisodesBySeason(new[] { episode }, request.AiredDuringSeason.Value, true).Any())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
MinCommunityRating = request.MinCommunityRating,
|
MinCommunityRating = request.MinCommunityRating,
|
||||||
MinCriticRating = request.MinCriticRating,
|
MinCriticRating = request.MinCriticRating,
|
||||||
ParentId = string.IsNullOrWhiteSpace(request.ParentId) ? (Guid?)null : new Guid(request.ParentId),
|
ParentId = string.IsNullOrWhiteSpace(request.ParentId) ? (Guid?)null : new Guid(request.ParentId),
|
||||||
ParentIndexNumber = request.ParentIndexNumber
|
ParentIndexNumber = request.ParentIndexNumber,
|
||||||
|
AiredDuringSeason = request.AiredDuringSeason
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(request.Ids))
|
if (!string.IsNullOrWhiteSpace(request.Ids))
|
||||||
|
@ -445,21 +446,6 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.AiredDuringSeason.HasValue)
|
|
||||||
{
|
|
||||||
var episode = i as Episode;
|
|
||||||
|
|
||||||
if (episode == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Series.FilterEpisodesBySeason(new[] { episode }, request.AiredDuringSeason.Value, true).Any())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1120,12 +1120,6 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.MinCommunityRating.HasValue)
|
|
||||||
{
|
|
||||||
Logger.Debug("Query requires post-filtering due to MinCommunityRating");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query.MinIndexNumber.HasValue)
|
if (query.MinIndexNumber.HasValue)
|
||||||
{
|
{
|
||||||
Logger.Debug("Query requires post-filtering due to MinIndexNumber");
|
Logger.Debug("Query requires post-filtering due to MinIndexNumber");
|
||||||
|
@ -1204,6 +1198,12 @@ namespace MediaBrowser.Controller.Entities
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.AiredDuringSeason.HasValue)
|
||||||
|
{
|
||||||
|
Logger.Debug("Query requires post-filtering due to AiredDuringSeason");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
public int? MinPlayers { get; set; }
|
public int? MinPlayers { get; set; }
|
||||||
public int? MaxPlayers { get; set; }
|
public int? MaxPlayers { get; set; }
|
||||||
public int? MinIndexNumber { get; set; }
|
public int? MinIndexNumber { get; set; }
|
||||||
|
public int? AiredDuringSeason { get; set; }
|
||||||
public double? MinCriticRating { get; set; }
|
public double? MinCriticRating { get; set; }
|
||||||
public double? MinCommunityRating { get; set; }
|
public double? MinCommunityRating { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -1737,6 +1737,21 @@ namespace MediaBrowser.Controller.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.AiredDuringSeason.HasValue)
|
||||||
|
{
|
||||||
|
var episode = item as Episode;
|
||||||
|
|
||||||
|
if (episode == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Series.FilterEpisodesBySeason(new[] { episode }, query.AiredDuringSeason.Value, true).Any())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue