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

@@ -75,6 +75,7 @@ namespace MediaBrowser.Controller.Entities
/// Gets or sets the album.
/// </summary>
/// <value>The album.</value>
[IgnoreDataMember]
public string Album { get; set; }
/// <summary>

View File

@@ -840,30 +840,6 @@ namespace MediaBrowser.Controller.Entities
return true;
}
if (query.HasImdbId.HasValue)
{
Logger.Debug("Query requires post-filtering due to HasImdbId");
return true;
}
if (query.HasTmdbId.HasValue)
{
Logger.Debug("Query requires post-filtering due to HasTmdbId");
return true;
}
if (query.HasTvdbId.HasValue)
{
Logger.Debug("Query requires post-filtering due to HasTvdbId");
return true;
}
if (query.IsYearMismatched.HasValue)
{
Logger.Debug("Query requires post-filtering due to IsYearMismatched");
return true;
}
if (query.HasOfficialRating.HasValue)
{
Logger.Debug("Query requires post-filtering due to HasOfficialRating");

View File

@@ -64,7 +64,6 @@ namespace MediaBrowser.Controller.Entities
public bool? IsInBoxSet { get; set; }
public bool? IsLocked { get; set; }
public bool? IsPlaceHolder { get; set; }
public bool? IsYearMismatched { get; set; }
public bool? HasImdbId { get; set; }
public bool? HasOverview { get; set; }
@@ -141,6 +140,7 @@ namespace MediaBrowser.Controller.Entities
public bool GroupByPresentationUniqueKey { get; set; }
public bool EnableTotalRecordCount { get; set; }
public bool ForceDirect { get; set; }
public Dictionary<string,string> ExcludeProviderIds { get; set; }
public InternalItemsQuery()
{
@@ -149,7 +149,8 @@ namespace MediaBrowser.Controller.Entities
AlbumNames = new string[] { };
ArtistNames = new string[] { };
ExcludeProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BlockUnratedItems = new UnratedItem[] { };
Tags = new string[] { };
OfficialRatings = new string[] { };

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