limit series pooling to common libraries

pull/702/head
Luke Pulverenti 8 years ago
parent d9ee4f81fd
commit e0e6c98e43

@ -32,7 +32,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The date last refreshed.</value>
DateTime DateLastRefreshed { get; set; }
/// <summary>
/// This is called before any metadata refresh and returns true or false indicating if changes were made
/// </summary>
@ -53,5 +53,11 @@ namespace MediaBrowser.Controller.Entities
bool RequiresRefresh();
bool EnableForceSaveOnDateModifiedChange { get; }
string PresentationUniqueKey { get; set; }
string GetPresentationUniqueKey();
string CreatePresentationUniqueKey();
}
}

@ -109,17 +109,16 @@ namespace MediaBrowser.Controller.Entities.TV
private string AddLibrariesToPresentationUniqueKey(string key)
{
return key;
//var folders = LibraryManager.GetCollectionFolders(this)
// .Select(i => i.Id.ToString("N"))
// .ToArray();
var folders = LibraryManager.GetCollectionFolders(this)
.Select(i => i.Id.ToString("N"))
.ToArray();
//if (folders.Length == 0)
//{
// return key;
//}
if (folders.Length == 0)
{
return key;
}
//return key + "-" + string.Join("-", folders);
return key + "-" + string.Join("-", folders);
}
private static string GetUniqueSeriesKey(BaseItem series)

@ -284,6 +284,13 @@ namespace MediaBrowser.Providers.Manager
updateType |= SaveCumulativeRunTimeTicks(item, isFullRefresh, currentUpdateType);
updateType |= SaveDateLastMediaAdded(item, isFullRefresh, currentUpdateType);
var presentationUniqueKey = item.CreatePresentationUniqueKey();
if (!string.Equals(item.PresentationUniqueKey, presentationUniqueKey, StringComparison.Ordinal))
{
item.PresentationUniqueKey = presentationUniqueKey;
updateType |= ItemUpdateType.MetadataImport;
}
return updateType;
}

@ -35,26 +35,17 @@ namespace MediaBrowser.Providers.TV
updateType |= SaveIsVirtualItem(item, episodes);
}
if (updateType <= ItemUpdateType.None)
if (!string.Equals(item.SeriesName, item.FindSeriesName(), StringComparison.Ordinal))
{
if (!string.Equals(item.SeriesName, item.FindSeriesName(), StringComparison.Ordinal))
{
updateType |= ItemUpdateType.MetadataImport;
}
updateType |= ItemUpdateType.MetadataImport;
}
if (updateType <= ItemUpdateType.None)
if (!string.Equals(item.SeriesSortName, item.FindSeriesSortName(), StringComparison.Ordinal))
{
if (!string.Equals(item.SeriesSortName, item.FindSeriesSortName(), StringComparison.Ordinal))
{
updateType |= ItemUpdateType.MetadataImport;
}
updateType |= ItemUpdateType.MetadataImport;
}
if (updateType <= ItemUpdateType.None)
if (item.SeriesId != item.FindSeriesId())
{
if (item.SeriesId != item.FindSeriesId())
{
updateType |= ItemUpdateType.MetadataImport;
}
updateType |= ItemUpdateType.MetadataImport;
}
return updateType;

Loading…
Cancel
Save