mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-09-22 20:36:05 -04:00
bugfix #1925: show orphaned episodes as standalone rows
Co-authored-by: rmcrackan <rmcrackan@gmail.com>
This commit is contained in:
6 files changed
+135
-9
No files matched your search
@@ -108,6 +108,16 @@ public static class LibraryBookQueries
|
||||
.ParentedEpisodes()
|
||||
.Select(ge => ge.Book.AudibleProductId), ge => ge.Book.AudibleProductId);
|
||||
|
||||
/// <summary>
|
||||
/// Books displayed as top-level rows: ordinary products plus episodes whose series parent
|
||||
/// is not in the database. Showing orphaned episodes here keeps a successfully imported
|
||||
/// title discoverable instead of silently hiding it from both grids.
|
||||
/// </summary>
|
||||
public IEnumerable<LibraryBook> StandaloneBooks()
|
||||
=> libraryBooks
|
||||
.Where(lb => lb.Book.IsProduct())
|
||||
.Concat(libraryBooks.FindOrphanedEpisodes());
|
||||
|
||||
public IEnumerable<LibraryBook> FindChildren(LibraryBook parent)
|
||||
=> libraryBooks.Where(lb => lb.Book.IsEpisodeChild() && lb.HasSeriesId(parent.Book.AudibleProductId));
|
||||
|
||||
|
||||
Reference in new issue
Block a user