Fixed: Null reference exceptions on update

Simplify entity equality code and enfore db/metadata split

Use a nuget package to remove boilerplate code that needs careful
update when adding/removing fields.  Add tests to enforce that all
fields are allocated to 'UseMetadataFrom' or 'UseDbFieldsFrom' to make
metadata refresh more foolproof.

Fix NRE when tracks are merged because artist wasn't set.
Fix NRE when tracks are merged and the merge target wasn't yet in the database.
This commit is contained in:
ta264
2019-08-27 21:23:35 +01:00
parent c4578c0b0f
commit 2097bfff94
23 changed files with 726 additions and 414 deletions
@@ -6,6 +6,7 @@
<ItemGroup>
<PackageReference Include="NBuilder" Version="6.0.0" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="4.0.11" />
<PackageReference Include="AutoFixture" Version="4.11.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Test.Common\Lidarr.Test.Common.csproj" />