update owned items

This commit is contained in:
Luke Pulverenti
2017-09-18 12:52:22 -04:00
parent b01489c40f
commit cdd79ec7e2
30 changed files with 375 additions and 179 deletions

View File

@@ -1,5 +1,7 @@
using System.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.IO;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
@@ -20,6 +22,8 @@ namespace MediaBrowser.Controller.Providers
public MetadataRefreshMode MetadataRefreshMode { get; set; }
public RemoteSearchResult SearchResult { get; set; }
public List<string> RefreshPaths { get; set; }
public bool ForceSave { get; set; }
public MetadataRefreshOptions(IFileSystem fileSystem)
@@ -44,6 +48,26 @@ namespace MediaBrowser.Controller.Providers
ReplaceAllImages = copy.ReplaceAllImages;
ReplaceImages = copy.ReplaceImages.ToList();
SearchResult = copy.SearchResult;
if (copy.RefreshPaths != null && copy.RefreshPaths.Count > 0)
{
if (RefreshPaths == null)
{
RefreshPaths = new List<string>();
}
RefreshPaths.AddRange(copy.RefreshPaths);
}
}
public bool RefreshItem(BaseItem item)
{
if (RefreshPaths != null && RefreshPaths.Count > 0)
{
return RefreshPaths.Contains(item.Path ?? string.Empty, StringComparer.OrdinalIgnoreCase);
}
return true;
}
}
}