Small Tweaks before Release (#2571)
Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
This commit is contained in:
parent
95a186e252
commit
1d56f5a0a1
12 changed files with 43 additions and 71 deletions
|
@ -354,15 +354,6 @@ public class SettingsController : BaseApiController
|
|||
{
|
||||
setting.Value = updateSettingsDto.EnableFolderWatching + string.Empty;
|
||||
_unitOfWork.SettingsRepository.Update(setting);
|
||||
|
||||
if (updateSettingsDto.EnableFolderWatching)
|
||||
{
|
||||
await _libraryWatcher.StartWatching();
|
||||
}
|
||||
else
|
||||
{
|
||||
_libraryWatcher.StopWatching();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -378,6 +369,15 @@ public class SettingsController : BaseApiController
|
|||
_directoryService.CopyDirectoryToDirectory(originalBookmarkDirectory, bookmarkDirectory);
|
||||
_directoryService.ClearAndDeleteDirectory(originalBookmarkDirectory);
|
||||
}
|
||||
|
||||
if (updateSettingsDto.EnableFolderWatching)
|
||||
{
|
||||
await _libraryWatcher.StartWatching();
|
||||
}
|
||||
else
|
||||
{
|
||||
_libraryWatcher.StopWatching();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -385,6 +385,7 @@ public class UserRepository : IUserRepository
|
|||
return await _context.AppUserDashboardStream
|
||||
.Include(d => d.SmartFilter)
|
||||
.Where(d => d.SmartFilter != null && d.SmartFilter.Id == filterId)
|
||||
.AsSplitQuery()
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
|
@ -408,6 +409,7 @@ public class UserRepository : IUserRepository
|
|||
Order = d.Order,
|
||||
Visible = d.Visible
|
||||
})
|
||||
.AsSplitQuery()
|
||||
.ToListAsync();
|
||||
|
||||
var libraryIds = sideNavStreams.Where(d => d.StreamType == SideNavStreamType.Library)
|
||||
|
|
|
@ -108,6 +108,7 @@ public class StatisticService : IStatisticService
|
|||
.Join(_context.Chapter, p => p.ChapterId, c => c.Id,
|
||||
(p, c) => new
|
||||
{
|
||||
// TODO: See if this can be done in the DB layer
|
||||
AverageReadingHours = Math.Min((float) p.PagesRead / (float) c.Pages, 1.0) *
|
||||
((float) c.AvgHoursToRead)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue