diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index f862ce61b..eefce2fd3 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -538,8 +538,12 @@ namespace MediaBrowser.Controller.Entities var validChildren = new ConcurrentBag>(); cancellationToken.ThrowIfCancellationRequested(); - - Parallel.ForEach(nonCachedChildren, child => + + var options = new ParallelOptions + { + }; + + Parallel.ForEach(nonCachedChildren, options, child => { BaseItem currentChild; diff --git a/MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs b/MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs index 479a2b1af..542b8eed8 100644 --- a/MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs +++ b/MediaBrowser.Controller/Providers/MediaInfo/FFProbeAudioInfoProvider.cs @@ -139,7 +139,7 @@ namespace MediaBrowser.Controller.Providers.MediaInfo // If we don't have a ProductionYear try and get it from PremiereDate if (audio.PremiereDate.HasValue && !audio.ProductionYear.HasValue) { - audio.ProductionYear = audio.PremiereDate.Value.Year; + audio.ProductionYear = audio.PremiereDate.Value.ToLocalTime().Year; } FetchGenres(audio, tags); diff --git a/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs index 00d604d8d..fb8370248 100644 --- a/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Controller/Providers/Movies/MovieDbProvider.cs @@ -927,19 +927,19 @@ namespace MediaBrowser.Controller.Providers.Movies movie.OfficialRating = ourRelease.certification ?? usRelease.certification; if (ourRelease.release_date > new DateTime(1900, 1, 1)) { - movie.PremiereDate = ourRelease.release_date; + movie.PremiereDate = ourRelease.release_date.ToUniversalTime(); movie.ProductionYear = ourRelease.release_date.Year; } else { - movie.PremiereDate = usRelease.release_date; + movie.PremiereDate = usRelease.release_date.ToUniversalTime(); movie.ProductionYear = usRelease.release_date.Year; } } else { //no specific country release info at all - movie.PremiereDate = movieData.release_date; + movie.PremiereDate = movieData.release_date.ToUniversalTime(); movie.ProductionYear = movieData.release_date.Year; } diff --git a/MediaBrowser.Controller/Providers/Movies/TmdbPersonProvider.cs b/MediaBrowser.Controller/Providers/Movies/TmdbPersonProvider.cs index 49823b9b6..699c5473b 100644 --- a/MediaBrowser.Controller/Providers/Movies/TmdbPersonProvider.cs +++ b/MediaBrowser.Controller/Providers/Movies/TmdbPersonProvider.cs @@ -231,12 +231,12 @@ namespace MediaBrowser.Controller.Providers.Movies if (DateTime.TryParseExact(searchResult.Birthday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out date)) { - person.PremiereDate = date; + person.PremiereDate = date.ToUniversalTime(); } if (DateTime.TryParseExact(searchResult.Deathday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out date)) { - person.EndDate = date; + person.EndDate = date.ToUniversalTime(); } if (!string.IsNullOrEmpty(searchResult.Homepage)) diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index e6c67d6c9..91187b687 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -569,7 +569,7 @@ namespace MediaBrowser.Server.Implementations.Library /// /// The images by name item cache /// - private readonly ConcurrentDictionary ImagesByNameItemCache = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase); + private readonly ConcurrentDictionary _imagesByNameItemCache = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase); /// /// Generically retrieves an IBN item @@ -596,7 +596,7 @@ namespace MediaBrowser.Server.Implementations.Library var key = Path.Combine(path, FileSystem.GetValidFilename(name)); - var obj = ImagesByNameItemCache.GetOrAdd(key, keyname => CreateImagesByNameItem(path, name, cancellationToken, allowSlowProviders)); + var obj = _imagesByNameItemCache.GetOrAdd(key, keyname => CreateImagesByNameItem(path, name, cancellationToken, allowSlowProviders)); return obj as Task; } @@ -677,7 +677,7 @@ namespace MediaBrowser.Server.Implementations.Library public async Task ValidatePeople(CancellationToken cancellationToken, IProgress progress) { // Clear the IBN cache - ImagesByNameItemCache.Clear(); + _imagesByNameItemCache.Clear(); const int maxTasks = 250; diff --git a/MediaBrowser.ServerApplication/Controls/ItemUpdateNotification.xaml.cs b/MediaBrowser.ServerApplication/Controls/ItemUpdateNotification.xaml.cs index 5dceba994..1f224f24d 100644 --- a/MediaBrowser.ServerApplication/Controls/ItemUpdateNotification.xaml.cs +++ b/MediaBrowser.ServerApplication/Controls/ItemUpdateNotification.xaml.cs @@ -206,7 +206,7 @@ namespace MediaBrowser.ServerApplication.Controls else { txtPremeireDate.Visibility = Visibility.Visible; - txtPremeireDate.Text = "Premiered " + item.PremiereDate.Value.ToShortDateString(); + txtPremeireDate.Text = "Premiered " + item.PremiereDate.Value.ToLocalTime().ToShortDateString(); } }