Bug fix for issue #152 : individual episodes were ignored when targeted directly (as opposed to targeting the parent series)

This commit is contained in:
Robert McRackan 2021-11-09 21:27:44 -05:00
parent 6e84fd97f1
commit e67eac92fd
2 changed files with 10 additions and 3 deletions

View File

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

View File

@ -166,8 +166,7 @@ namespace AudibleUtilities
Serilog.Log.Logger.Information($"{parents.Count} series of shows/podcasts found");
// remove episode parents. even if the following stuff fails, these will still be removed from the collection.
// also must happen before processing children because children abuses this flag
// remove episode parents. even if the following stuff fails, these will still be removed from the collection
items.RemoveAll(i => i.IsEpisodes);
if (importEpisodes)
@ -192,6 +191,14 @@ namespace AudibleUtilities
{
var children = await getEpisodeChildrenAsync(parent);
// actual individual episode, not the parent of a series.
// for now I'm keeping it inside this method since it fits the work flow, incl. importEpisodes logic
if (!children.Any())
{
results.Add(parent);
continue;
}
foreach (var child in children)
{
// use parent's 'DateAdded'. DateAdded is just a convenience prop for: PurchaseDate.UtcDateTime