Random Changes and Enhancements (#1819)
* When skipping over folders in a scan, inform the ui * Try out new backout condition for library watcher. * Tweaked the code for folder watching to be more intense on killing if stuck in inotify loop. * Streamlined my implementation of enhanced LibraryWatcher * Added new extension method to make complex where statements cleaner. * Added an implementation to flatten series and not show them if they have relationships defined. Only the parent would show. Currently disabled until i figure out how to apply it. * Added the ability to collapse series that are not the primary entry point to reading. Configurable in library settings, only applies when all libraries in a filter have the property to true. * Exclude from parsing .@_thumb directories, a QNAP system folder. Show number of items a JumpKey has * Refactored some time reading to display in days, months, years or minutes.
This commit is contained in:
parent
8a62d54c0b
commit
df68c50256
23 changed files with 2038 additions and 48 deletions
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using API.Data.Misc;
|
||||
using API.Data.Repositories;
|
||||
|
@ -234,4 +235,10 @@ public static class QueryableExtensions
|
|||
|
||||
public static IEnumerable<DateTime> Range(this DateTime startDate, int numberOfDays) =>
|
||||
Enumerable.Range(0, numberOfDays).Select(e => startDate.AddDays(e));
|
||||
|
||||
public static IQueryable<T> WhereIf<T>(this IQueryable<T> queryable, bool condition,
|
||||
Expression<Func<T, bool>> predicate)
|
||||
{
|
||||
return condition ? queryable.Where(predicate) : queryable;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue