add provider ids to database

This commit is contained in:
Luke Pulverenti
2016-06-02 00:41:12 -04:00
parent a8c11c0fd2
commit 2979185d8e
10 changed files with 95 additions and 78 deletions

View File

@@ -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();