aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryService.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-08-29 14:07:27 -0400
committerLuke <luke.pulverenti@gmail.com>2015-08-29 14:07:27 -0400
commit6f343203ce1d46f83e3b0d5d2865d30f9b9e6a36 (patch)
tree99757b4beec8399d27fadbab7e4a8ac545c22bb7 /MediaBrowser.Api/Library/LibraryService.cs
parent3425b53376e2d7a624e238159414bde9e12f61e6 (diff)
parent636bd5ab76b7cb78c1784d2004b1fe4eedeb4162 (diff)
Merge branch 'dev' of https://github.com/MediaBrowser/MediaBrowser into dev
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryService.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs
index 3e49c1c9e..ed3f2c633 100644
--- a/MediaBrowser.Api/Library/LibraryService.cs
+++ b/MediaBrowser.Api/Library/LibraryService.cs
@@ -270,6 +270,7 @@ namespace MediaBrowser.Api.Library
private readonly ILiveTvManager _liveTv;
private readonly IChannelManager _channelManager;
private readonly ITVSeriesManager _tvManager;
+ private readonly ILibraryMonitor _libraryMonitor;
/// <summary>
/// Initializes a new instance of the <see cref="LibraryService" /> class.
@@ -422,7 +423,25 @@ namespace MediaBrowser.Api.Library
public void Post(PostUpdatedSeries request)
{
- Task.Run(() => _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None));
+ var series = _libraryManager.GetItems(new InternalItemsQuery
+ {
+ IncludeItemTypes = new[] { typeof(Series).Name }
+
+ }).Items;
+
+ series = series.Where(i => string.Equals(request.TvdbId, i.GetProviderId(MetadataProviders.Tvdb), StringComparison.OrdinalIgnoreCase)).ToArray();
+
+ if (series.Length > 0)
+ {
+ foreach (var item in series)
+ {
+ _libraryMonitor.ReportFileSystemChanged(item.Path);
+ }
+ }
+ else
+ {
+ Task.Run(() => _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None));
+ }
}
public object Get(GetDownload request)