jellyfin-server/MediaBrowser.Controller/Providers
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
..
AlbumInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
ArtistInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
BookInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
BoxSetInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
DirectoryService.cs make directoryservice cache case sensitive 2021-03-27 00:26:56 +01:00
DynamicImageResponse.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
EpisodeInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
ICustomMetadataProvider.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IDirectoryService.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IDynamicImageProvider.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IExternalId.cs Remove 'General' as an ExternalIdMediaType, and instead use 'null' to represent a general external id type 2020-05-23 16:08:51 -04:00
IForcedProvider.cs remove unused files and fix some future warnings 2020-03-09 23:30:57 +09:00
IHasItemChangeMonitor.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IHasLookupInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IHasOrder.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IImageProvider.cs remove unused files and fix some future warnings 2020-03-09 23:30:57 +09:00
ILocalImageProvider.cs FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
ILocalMetadataProvider.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
ImageRefreshOptions.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IMetadataProvider.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IMetadataService.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IPreRefreshProvider.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IProviderManager.cs Fix possible nullref 2021-04-04 01:45:15 +02:00
IRemoteImageProvider.cs Remove IHttpClient from IRemoteImageProvider 2020-08-17 11:51:53 -06:00
IRemoteMetadataProvider.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
IRemoteSearchProvider.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
ItemInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
ItemLookupInfo.cs Add the item path to the ItemLookupInfo class. 2020-09-02 20:11:31 +02:00
LocalImageInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
MetadataRefreshMode.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
MetadataRefreshOptions.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
MetadataResult.cs Add nfo thumb tag support 2021-02-28 15:00:17 +01:00
MovieInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
MusicVideoInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
PersonLookupInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
RemoteSearchQuery.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
SeasonInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
SeriesInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
SongInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
TrailerInfo.cs Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
VideoContentType.cs Add full stop at end of comments (SA1629) 2020-06-16 10:37:52 +12:00