Compare commits

..

5 Commits

Author SHA1 Message Date
Robert McRackan
f27ac279b2 Bugfix: some series indexes/sequences could cause library not to import 2020-02-17 15:17:59 -05:00
Robert McRackan
ed03fd2451 increment csproj version 2020-02-14 14:08:51 -05:00
Robert McRackan
ccb60ae367 Bugfix: IsAuthorNarrated was returning no books 2020-02-14 14:01:36 -05:00
Robert McRackan
6ad541c199 fix weirdness with build number 2020-01-02 09:01:04 -05:00
Robert McRackan
9606acda26 update release notes 2019-12-31 13:00:36 -05:00
5 changed files with 30 additions and 6 deletions

View File

@@ -131,7 +131,18 @@ namespace DtoImporterService
foreach (var seriesEntry in item.Series)
{
var series = DbContext.Series.Local.Single(s => seriesEntry.SeriesId == s.AudibleSeriesId);
book.UpsertSeries(series, seriesEntry.Index);
var index = 0f;
try
{
index = seriesEntry.Index;
}
catch (Exception ex)
{
Serilog.Log.Logger.Error(ex, $"Error parsing series index. Title: {item.Title}. ASIN: {item.Asin}. Series index: {seriesEntry.Sequence}");
}
book.UpsertSeries(series, index);
}
}
}

View File

@@ -13,7 +13,7 @@
<!-- <PublishSingleFile>true</PublishSingleFile> -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Version>3.1.2.0</Version>
<Version>3.1.5.3</Version>
</PropertyGroup>
<ItemGroup>

View File

@@ -105,14 +105,24 @@ namespace LibationSearchEngine
["HasPDF"] = lb => lb.Book.Supplements.Any(),
["PDFs"] = lb => lb.Book.Supplements.Any(),
["PDF"] = lb => lb.Book.Supplements.Any(),
["IsRated"] = lb => lb.Book.UserDefinedItem.Rating.OverallRating > 0f,
["Rated"] = lb => lb.Book.UserDefinedItem.Rating.OverallRating > 0f,
["IsAuthorNarrated"] = lb => lb.Book.Authors.Intersect(lb.Book.Narrators).Any(),
["AuthorNarrated"] = lb => lb.Book.Authors.Intersect(lb.Book.Narrators).Any(),
["IsAuthorNarrated"] = lb => isAuthorNarrated(lb),
["AuthorNarrated"] = lb => isAuthorNarrated(lb),
[nameof(Book.IsAbridged)] = lb => lb.Book.IsAbridged,
["Abridged"] = lb => lb.Book.IsAbridged,
});
private static bool isAuthorNarrated(LibraryBook lb)
{
var authors = lb.Book.Authors.Select(a => a.Name).ToArray();
var narrators = lb.Book.Narrators.Select(a => a.Name).ToArray();
return authors.Intersect(narrators).Any();
}
// use these common fields in the "all" default search field
private static IEnumerable<Func<LibraryBook, string>> allFieldIndexRules { get; }
= new List<Func<LibraryBook, string>>

View File

@@ -73,7 +73,7 @@
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(168, 52);
this.label4.TabIndex = 3;
this.label4.Text = "BOOL FIELDS\r\n\r\nFind books that you haven\'t rated:\r\n -IsRated";
this.label4.Text = "BOOLEAN (TRUE/FALSE) FIELDS\r\n\r\nFind books that you haven\'t rated:\r\n -IsRated";
//
// label5
//

View File

@@ -1,7 +1,10 @@
-- begin VERSIONING ---------------------------------------------------------------------------------------------------------------------
https://github.com/rmcrackan/Libation/releases
v3.1.2 : null checks
v3.1.5 : Bugfix: some series indexes/sequences could cause library not to import
v3.1.4 : Bugfix: IsAuthorNarrated was returning no books
v3.1.3 : fix weirdness with build number
v3.1.2 : minor bug fixes
v3.1.1 : Check if upgrade available on github
v3.1.0 : FIRST PUBLIC RELEASE
v3.1-beta.11 : Improved configuration and settings file management. Configurable logging