mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 05:18:27 +01:00
update owned items
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user