
* Fixed inputs not showing inline validation due to a missing class * Fixed some checks * Increased the button size on manga reader (develop) * Migrated a type cast to a pure pipe * Sped up the check for if SendTo should render on the menu * Don't allow user to bookmark in bookmark mode * Fixed a bug where Scan Series would skip over Specials due to how new scan loop works. * Fixed scroll to top button persisting when navigating between pages * Edit Series modal now doesn't have a lock field for Series, which can't be locked as it is inheritently locked. Added some validation to ensure Name and SortName are required. * Fixed up some spacing * Fixed actionable menu not opening submenu on mobile * Cleaned up the layout of cover image on series detail * Show all volume or chapters (if only one volume) for cover selection on series * Don't open submenu to right if there is no space * Fixed up cover image not allowing custom saves of existing series/chapter/volume images. Fixed up logging so console output matches log file. * Implemented the ability to turn off css transitions in the UI. * Updated a note internally * Code smells * Added InstallId when pinging the email service to allow throughput tracking
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using API.Entities.Enums;
|
|
using API.Entities.Interfaces;
|
|
|
|
namespace API.Entities;
|
|
|
|
public class Library : IEntityDate
|
|
{
|
|
public int Id { get; set; }
|
|
public string Name { get; set; }
|
|
/// <summary>
|
|
/// This is not used, but planned once we build out a Library detail page
|
|
/// </summary>
|
|
[Obsolete("This has never been coded for. Likely we can remove it.")]
|
|
public string CoverImage { get; set; }
|
|
public LibraryType Type { get; set; }
|
|
public DateTime Created { get; set; }
|
|
public DateTime LastModified { get; set; }
|
|
/// <summary>
|
|
/// Last time Library was scanned
|
|
/// </summary>
|
|
/// <remarks>Time stored in UTC</remarks>
|
|
public DateTime LastScanned { get; set; }
|
|
public ICollection<FolderPath> Folders { get; set; }
|
|
public ICollection<AppUser> AppUsers { get; set; }
|
|
public ICollection<Series> Series { get; set; }
|
|
|
|
// Methods
|
|
/// <summary>
|
|
/// Has there been any modifications to the FolderPath's directory since the <see cref="FolderPath.LastScanned"/> date
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public bool AnyModificationsSinceLastScan()
|
|
{
|
|
// NOTE: I don't think we can do this due to NTFS
|
|
return Folders.All(folder => File.GetLastWriteTimeUtc(folder.Path) > folder.LastScanned);
|
|
}
|
|
|
|
}
|