mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-01-01 10:28:21 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f27ac279b2 | ||
|
|
ed03fd2451 | ||
|
|
ccb60ae367 | ||
|
|
6ad541c199 | ||
|
|
9606acda26 |
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>>
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user