#367 : New template option "year": year published to audible
This commit is contained in:
parent
99564d9c25
commit
d64e043fe8
8 changed files with 13 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ namespace LibationFileManager
|
|||
public string AudibleProductId { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Locale { get; set; }
|
||||
public int? YearPublished { get; set; }
|
||||
|
||||
public IEnumerable<string> Authors { get; set; }
|
||||
public string AuthorNames => string.Join(", ", Authors);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ namespace LibationFileManager
|
|||
public static TemplateTags Channels { get; } = new TemplateTags("channels", "Number of audio channels");
|
||||
public static TemplateTags Account { get; } = new TemplateTags("account", "Audible account of this book");
|
||||
public static TemplateTags Locale { get; } = new TemplateTags("locale", "Region/country");
|
||||
public static TemplateTags YearPublished { get; } = new TemplateTags("year", "Year published");
|
||||
|
||||
// Special case. Isn't mapped to a replacement in Templates.cs
|
||||
// Included here for display by EditTemplateDialog
|
||||
|
|
|
|||
|
|
@ -142,8 +142,9 @@ namespace LibationFileManager
|
|||
fileNamingTemplate.AddParameterReplacement(TemplateTags.Channels, libraryBookDto.Channels);
|
||||
fileNamingTemplate.AddParameterReplacement(TemplateTags.Account, libraryBookDto.Account);
|
||||
fileNamingTemplate.AddParameterReplacement(TemplateTags.Locale, libraryBookDto.Locale);
|
||||
fileNamingTemplate.AddParameterReplacement(TemplateTags.YearPublished, libraryBookDto.YearPublished?.ToString() ?? "1900");
|
||||
|
||||
return fileNamingTemplate;
|
||||
return fileNamingTemplate;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue