Files
Libation/Source/LibationFileManager/Templates/LibraryBookDto.cs
2026-03-26 03:12:24 +01:00

49 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
namespace LibationFileManager.Templates;
public class BookDto
{
public required string AudibleProductId { get; set; }
public string? Title { get; set; }
public string? Subtitle { get; set; }
public string? TitleWithSubtitle { get; set; }
public string? Locale { get; set; }
public int? YearPublished { get; set; }
public IEnumerable<ContributorDto>? Authors { get; set; }
public ContributorDto? FirstAuthor => Authors?.FirstOrDefault();
public IEnumerable<ContributorDto>? Narrators { get; set; }
public ContributorDto? FirstNarrator => Narrators?.FirstOrDefault();
public IEnumerable<SeriesDto>? Series { get; set; }
public SeriesDto? FirstSeries => Series?.FirstOrDefault();
public bool IsAbridged { get; set; }
public bool IsSeries => Series is not null;
public bool IsPodcastParent { get; set; }
public bool IsPodcast { get; set; }
public TimeSpan LengthInMinutes { get; set; }
public int? BitRate { get; set; }
public int? SampleRate { get; set; }
public int? Channels { get; set; }
public string? Codec { get; set; }
public DateTime FileDate { get; set; } = DateTime.Now;
public DateTime? DatePublished { get; set; }
public string? Language { get; set; }
public string? LibationVersion { get; set; }
public string? FileVersion { get; set; }
}
public class LibraryBookDto : BookDto
{
public DateTime? DateAdded { get; set; }
public string? Account { get; set; }
public string? AccountNickname { get; set; }
public IEnumerable<StringDto>? Tags { get; set; }
}