jellyfin-server/MediaBrowser.Controller
Bond_009 2ed0801be2 Fix possible nullref
when `ProviderManager.SaveMetadata` gets called before
`ProviderManager.AddParts`

```
Error Message:
   System.ArgumentNullException : Value cannot be null. (Parameter 'source')
  Stack Trace:
     at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)
   at MediaBrowser.Providers.Manager.ProviderManager.SaveMetadata(BaseItem item, ItemUpdateType updateType, IEnumerable`1 savers) in D:\a\1\s\MediaBrowser.Providers\Manager\ProviderManager.cs:line 674
   at MediaBrowser.Providers.Manager.ProviderManager.SaveMetadata(BaseItem item, ItemUpdateType updateType) in D:\a\1\s\MediaBrowser.Providers\Manager\ProviderManager.cs:line 655
   at Emby.Server.Implementations.Library.LibraryManager.RunMetadataSavers(BaseItem item, ItemUpdateType updateReason) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 2012
   at Emby.Server.Implementations.Library.LibraryManager.UpdateItemsAsync(IReadOnlyList`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 1970
   at Emby.Server.Implementations.Library.LibraryManager.CreateRootFolder() in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 775
   at Emby.Server.Implementations.Library.LibraryManager.get_RootFolder() in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 180
   at Emby.Server.Implementations.IO.LibraryMonitor.Start() in D:\a\1\s\Emby.Server.Implementations\IO\LibraryMonitor.cs:line 135
   at Emby.Server.Implementations.IO.LibraryMonitorStartup.RunAsync() in D:\a\1\s\Emby.Server.Implementations\IO\LibraryMonitorStartup.cs:line 26
   at Emby.Server.Implementations.ApplicationHost.StartEntryPoints(IEnumerable`1 entryPoints, Boolean isBeforeStartup)+MoveNext() in D:\a\1\s\Emby.Server.Implementations\ApplicationHost.cs:line 541
   at System.Threading.Tasks.Task.WhenAll(IEnumerable`1 tasks)
   at Emby.Server.Implementations.ApplicationHost.RunStartupTasksAsync(CancellationToken cancellationToken) in D:\a\1\s\Emby.Server.Implementations\ApplicationHost.cs:line 525
   at Jellyfin.Server.Integration.Tests.JellyfinApplicationFactory.CreateServer(IWebHostBuilder builder) in D:\a\1\s\tests\Jellyfin.Server.Integration.Tests\JellyfinApplicationFactory.cs:line 101
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.EnsureServer()
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateDefaultClient(DelegatingHandler[] handlers)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateDefaultClient(Uri baseAddress, DelegatingHandler[] handlers)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateClient(WebApplicationFactoryClientOptions options)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateClient()
   at Jellyfin.Server.Integration.Tests.OpenApiSpecTests.GetSpec_ReturnsCorrectResponse() in D:\a\1\s\tests\Jellyfin.Server.Integration.Tests\OpenApiSpecTests.cs:line 26
--- End of stack trace from previous location ---
```
2021-04-04 01:45:15 +02:00
..
Authentication Remove extra newline 2020-08-22 21:57:28 +02:00
BaseItemManager Fix copy-paste error 2020-12-11 14:03:10 -07:00
Channels Use a more descriptive function name 2020-12-13 08:15:26 -07:00
Chapters Minor improvements 2020-02-23 10:53:51 +01:00
Collections Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
Configuration use constructor to set optimal config values 2020-06-27 00:22:27 +09:00
Devices Merge branch 'master' into event-rewrite-1 2020-08-24 20:04:13 -04:00
Dlna Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
Drawing Enable nullable for Jellyfin.Data and remove unnecessary attributes 2021-03-06 17:43:01 -05:00
Dto Convert array property to IReadOnlyList 2020-11-12 08:29:42 -07:00
Entities FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
Events Initial upload 2020-12-14 16:14:39 +00:00
Extensions Minor improvements 2020-09-20 14:02:41 +02:00
IO Fix SA1513, SA1514, SA1507, and SA1508 2020-09-28 15:04:31 -05:00
Library Use distinct for artists to avoid double refreshing 2021-03-10 08:20:02 +01:00
LiveTv Update MediaBrowser.Controller/LiveTv/ChannelInfo.cs 2021-03-24 21:23:59 +01:00
MediaEncoding Ignore format for ISO files 2021-03-25 12:23:29 +01:00
Net Merge pull request #3194 from OancaAndrei/syncplay-enhanced 2020-12-04 20:22:30 -05:00
Notifications Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
Persistence Fix SA1513, SA1514, SA1507, and SA1508 2020-09-28 15:04:31 -05:00
Playlists Reduce RequestHelpers.Split usage and remove RequestHelpers.GetGuids usage. 2020-11-16 20:29:46 -07:00
Plugins Remoed configurationPageType 2021-01-15 10:36:44 +00:00
Properties Adjusted AssemblyCopyright attribute values. 2019-03-14 22:17:56 +01:00
Providers Fix possible nullref 2021-04-04 01:45:15 +02:00
QuickConnect Apply suggestions from code review 2020-08-17 17:13:11 -05:00
Resolvers do not resolve episode-like files if they are in extras folders 2021-03-14 19:56:45 +01:00
Security Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
Session Add SessionControllerConnected event 2020-12-07 01:04:48 +01:00
Sorting Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
Subtitles Fix added warnings 2020-09-11 16:11:19 -06:00
Sync Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
SyncPlay Update authorization policies for SyncPlay 2020-12-07 10:33:15 +01:00
TV Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IDisplayPreferencesManager.cs Add ItemId to all display preferences 2020-12-04 16:00:11 -07:00
IServerApplicationHost.cs fixed build 2021-02-28 10:16:28 +00:00
IServerApplicationPaths.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
MediaBrowser.Controller.csproj FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00