Example #1
0
        public void Post(PostUpdatedSeries request)
        {
            var series = _libraryManager.GetItemList(new InternalItemsQuery
            {
                IncludeItemTypes = new[] { typeof(Series).Name },
                DtoOptions       = new DtoOptions(false)
                {
                    EnableImages = false
                }
            }).Where(i => string.Equals(request.TvdbId, i.GetProviderId(MetadataProviders.Tvdb), StringComparison.OrdinalIgnoreCase)).ToArray();

            foreach (var item in series)
            {
                _libraryMonitor.ReportFileSystemChanged(item.Path);
            }
        }
Example #2
0
        public ActionResult PostUpdatedSeries([FromQuery] string?tvdbId)
        {
            var series = _libraryManager.GetItemList(new InternalItemsQuery
            {
                IncludeItemTypes = new[] { nameof(Series) },
                DtoOptions       = new DtoOptions(false)
                {
                    EnableImages = false
                }
            }).Where(i => string.Equals(tvdbId, i.GetProviderId(MediaBrowser.Model.Entities.MetadataProvider.Tvdb), StringComparison.OrdinalIgnoreCase)).ToArray();

            foreach (var item in series)
            {
                _libraryMonitor.ReportFileSystemChanged(item.Path);
            }

            return(NoContent());
        }
Example #3
0
        public void Post(PostUpdatedSeries request)
        {
            var series = _libraryManager.GetItemList(new InternalItemsQuery
            {
                IncludeItemTypes = new[] { typeof(Series).Name }
            }).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));
            }
        }