feat: add Book subtitle capturing so TitleShort reflects titles better
This commit is contained in:
parent
74ce408c8b
commit
2195574422
9 changed files with 482 additions and 9 deletions
|
|
@ -8,7 +8,22 @@ namespace LibationFileManager
|
|||
{
|
||||
public string AudibleProductId { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Locale { get; set; }
|
||||
public string Subtitle { get; set; }
|
||||
public string TitleWithSubtitle
|
||||
{
|
||||
get
|
||||
{
|
||||
string text = Title?.Trim();
|
||||
string text2 = Subtitle?.Trim();
|
||||
if (string.IsNullOrWhiteSpace(text2))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
|
||||
return text + ": " + text2;
|
||||
}
|
||||
}
|
||||
public string Locale { get; set; }
|
||||
public int? YearPublished { get; set; }
|
||||
|
||||
public IEnumerable<string> Authors { get; set; }
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ namespace LibationFileManager
|
|||
DateAdded = new DateTime(2022, 6, 9, 0, 0, 0),
|
||||
DatePublished = new DateTime(2017, 2, 27, 0, 0, 0),
|
||||
AudibleProductId = "123456789",
|
||||
Title = "A Study in Scarlet: A Sherlock Holmes Novel",
|
||||
Title = "A Study in Scarlet",
|
||||
Subtitle = "A Sherlock Holmes Novel",
|
||||
Locale = "us",
|
||||
YearPublished = 2017,
|
||||
Authors = new List<string> { "Arthur Conan Doyle", "Stephen Fry - introductions" },
|
||||
|
|
|
|||
|
|
@ -247,8 +247,8 @@ namespace LibationFileManager
|
|||
{
|
||||
//Don't allow formatting of Id
|
||||
{ TemplateTags.Id, lb => lb.AudibleProductId, v => v },
|
||||
{ TemplateTags.Title, lb => lb.Title },
|
||||
{ TemplateTags.TitleShort, lb => getTitleShort(lb.Title) },
|
||||
{ TemplateTags.Title, lb => lb.TitleWithSubtitle },
|
||||
{ TemplateTags.TitleShort, lb => lb.Title },
|
||||
{ TemplateTags.Author, lb => lb.Authors, NameListFormat.Formatter },
|
||||
{ TemplateTags.FirstAuthor, lb => lb.FirstAuthor },
|
||||
{ TemplateTags.Narrator, lb => lb.Narrators, NameListFormat.Formatter },
|
||||
|
|
@ -274,8 +274,8 @@ namespace LibationFileManager
|
|||
{
|
||||
new PropertyTagCollection<LibraryBookDto>(caseSensative: true, StringFormatter)
|
||||
{
|
||||
{ TemplateTags.Title, lb => lb.Title },
|
||||
{ TemplateTags.TitleShort, lb => getTitleShort(lb.Title) },
|
||||
{ TemplateTags.Title, lb => lb.TitleWithSubtitle },
|
||||
{ TemplateTags.TitleShort, lb => lb.Title },
|
||||
{ TemplateTags.Series, lb => lb.SeriesName },
|
||||
},
|
||||
new PropertyTagCollection<MultiConvertFileProperties>(caseSensative: true, StringFormatter, IntegerFormatter, DateTimeFormatter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue