mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
add provider ids to database
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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[] { };
|
||||
|
||||
@@ -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