mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
update album queries
This commit is contained in:
parent
a2a0e1ae75
commit
63fe0239e3
@ -260,7 +260,8 @@ namespace MediaBrowser.Api.Reports
|
||||
MinCommunityRating = request.MinCommunityRating,
|
||||
MinCriticRating = request.MinCriticRating,
|
||||
ParentIndexNumber = request.ParentIndexNumber,
|
||||
AiredDuringSeason = request.AiredDuringSeason
|
||||
AiredDuringSeason = request.AiredDuringSeason,
|
||||
AlbumArtistStartsWithOrGreater = request.AlbumArtistStartsWithOrGreater
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(request.Ids))
|
||||
@ -477,17 +478,6 @@ namespace MediaBrowser.Api.Reports
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(request.AlbumArtistStartsWithOrGreater))
|
||||
{
|
||||
var ok = new[] { i }.OfType<IHasAlbumArtist>()
|
||||
.Any(p => string.Compare(request.AlbumArtistStartsWithOrGreater, p.AlbumArtists.FirstOrDefault(), StringComparison.CurrentCultureIgnoreCase) < 1);
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
MinCriticRating = request.MinCriticRating,
|
||||
ParentId = string.IsNullOrWhiteSpace(request.ParentId) ? (Guid?)null : new Guid(request.ParentId),
|
||||
ParentIndexNumber = request.ParentIndexNumber,
|
||||
AiredDuringSeason = request.AiredDuringSeason
|
||||
AiredDuringSeason = request.AiredDuringSeason,
|
||||
AlbumArtistStartsWithOrGreater = request.AlbumArtistStartsWithOrGreater
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(request.Ids))
|
||||
@ -435,17 +436,6 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(request.AlbumArtistStartsWithOrGreater))
|
||||
{
|
||||
var ok = new[] { i }.OfType<IHasAlbumArtist>()
|
||||
.Any(p => string.Compare(request.AlbumArtistStartsWithOrGreater, p.AlbumArtists.FirstOrDefault(), StringComparison.CurrentCultureIgnoreCase) < 1);
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1188,6 +1188,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(query.AlbumArtistStartsWithOrGreater))
|
||||
{
|
||||
Logger.Debug("Query requires post-filtering due to AlbumArtistStartsWithOrGreater");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -125,6 +125,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public DayOfWeek[] AirDays { get; set; }
|
||||
public SeriesStatus[] SeriesStatuses { get; set; }
|
||||
public string AlbumArtistStartsWithOrGreater { get; set; }
|
||||
|
||||
public InternalItemsQuery()
|
||||
{
|
||||
|
@ -1752,6 +1752,17 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(query.AlbumArtistStartsWithOrGreater))
|
||||
{
|
||||
var ok = new[] { item }.OfType<IHasAlbumArtist>()
|
||||
.Any(p => string.Compare(query.AlbumArtistStartsWithOrGreater, p.AlbumArtists.FirstOrDefault(), StringComparison.CurrentCultureIgnoreCase) < 1);
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user