mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 06:23:03 +03:00
add provider ids to database
This commit is contained in:
@@ -995,11 +995,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
if (request.IsYearMismatched.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(request.Person))
|
||||
{
|
||||
return false;
|
||||
@@ -1418,16 +1413,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
if (query.IsYearMismatched.HasValue)
|
||||
{
|
||||
var filterValue = query.IsYearMismatched.Value;
|
||||
|
||||
if (IsYearMismatched(item, libraryManager) != filterValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (query.HasOfficialRating.HasValue)
|
||||
{
|
||||
var filterValue = query.HasOfficialRating.Value;
|
||||
@@ -1979,34 +1964,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
return _userViewManager.GetUserSubView(parent.Id.ToString("N"), type, sortName, CancellationToken.None);
|
||||
}
|
||||
|
||||
public static bool IsYearMismatched(BaseItem item, ILibraryManager libraryManager)
|
||||
{
|
||||
if (item.ProductionYear.HasValue)
|
||||
{
|
||||
var path = item.Path;
|
||||
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
var info = libraryManager.ParseName(Path.GetFileName(path));
|
||||
var yearInName = info.Year;
|
||||
|
||||
// Go up a level if we didn't get a year
|
||||
if (!yearInName.HasValue)
|
||||
{
|
||||
info = libraryManager.ParseName(Path.GetFileName(Path.GetDirectoryName(path)));
|
||||
yearInName = info.Year;
|
||||
}
|
||||
|
||||
if (yearInName.HasValue)
|
||||
{
|
||||
return yearInName.Value != item.ProductionYear.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static IEnumerable<BaseItem> FilterForAdjacency(IEnumerable<BaseItem> items, string adjacentToId)
|
||||
{
|
||||
var list = items.ToList();
|
||||
|
||||
Reference in New Issue
Block a user