Bug fix: podcast episodes with no title cause library import failure

This commit is contained in:
Robert McRackan 2021-09-21 15:06:01 -04:00
parent de1147ac1b
commit 96ffa619ec
2 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Version>6.0.1.1</Version>
<Version>6.0.2.1</Version>
</PropertyGroup>
<ItemGroup>

View File

@ -33,8 +33,10 @@ namespace InternalUtilities
if (items.Any(i => string.IsNullOrWhiteSpace(i.ProductId)))
exceptions.Add(new ArgumentException($"Collection contains item(s) with blank {nameof(Item.ProductId)}", nameof(items)));
if (items.Any(i => string.IsNullOrWhiteSpace(i.Title)))
exceptions.Add(new ArgumentException($"Collection contains item(s) with blank {nameof(Item.Title)}", nameof(items)));
// this can happen with podcast episodes
foreach (var i in items.Where(i => string.IsNullOrWhiteSpace(i.Title)))
i.Title = "[blank title]";
return exceptions;
}