mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-27 18:10:54 +01:00
have seasons refresh on series folder changes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.IO;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
@@ -35,9 +36,9 @@ namespace MediaBrowser.Providers
|
||||
.FirstOrDefault(i => i != null);
|
||||
}
|
||||
|
||||
protected override Guid GetFileSystemStamp(BaseItem item)
|
||||
protected override Guid GetFileSystemStamp(IEnumerable<BaseItem> items)
|
||||
{
|
||||
var files = item.ResolveArgs.PhysicalLocations
|
||||
var files = items.SelectMany(i => i.ResolveArgs.PhysicalLocations)
|
||||
.Select(i => new DirectoryInfo(i))
|
||||
.SelectMany(i => i.EnumerateFiles("*", SearchOption.TopDirectoryOnly))
|
||||
.Where(i =>
|
||||
|
||||
@@ -58,6 +58,21 @@ namespace MediaBrowser.Providers
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override IEnumerable<BaseItem> GetItemsForFileStampComparison(BaseItem item)
|
||||
{
|
||||
var season = item as Season;
|
||||
if (season != null)
|
||||
{
|
||||
var series = season.Series;
|
||||
if (series != null)
|
||||
{
|
||||
return new[] { item, series };
|
||||
}
|
||||
}
|
||||
|
||||
return base.GetItemsForFileStampComparison(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the priority.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.IO;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
@@ -69,9 +70,9 @@ namespace MediaBrowser.Providers
|
||||
return GetImageFromLocation(location, filenameWithoutExtension);
|
||||
}
|
||||
|
||||
protected override Guid GetFileSystemStamp(BaseItem item)
|
||||
protected override Guid GetFileSystemStamp(IEnumerable<BaseItem> items)
|
||||
{
|
||||
var location = GetLocation(item);
|
||||
var location = GetLocation(items.First());
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user