Update audio duration on library scan (#707)
This commit is contained in:
parent
e65b6c76a8
commit
fb9b4eb77e
@ -106,6 +106,7 @@ namespace DataLayer
|
|||||||
ReplaceAuthors(authors);
|
ReplaceAuthors(authors);
|
||||||
ReplaceNarrators(narrators);
|
ReplaceNarrators(narrators);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateTitle(string title, string subtitle)
|
public void UpdateTitle(string title, string subtitle)
|
||||||
{
|
{
|
||||||
Title = title?.Trim() ?? "";
|
Title = title?.Trim() ?? "";
|
||||||
@ -113,6 +114,9 @@ namespace DataLayer
|
|||||||
_titleWithSubtitle = null;
|
_titleWithSubtitle = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateLengthInMinutes(int lengthInMinutes)
|
||||||
|
=> LengthInMinutes = lengthInMinutes;
|
||||||
|
|
||||||
#region contributors, authors, narrators
|
#region contributors, authors, narrators
|
||||||
internal HashSet<BookContributor> ContributorsLink { get; private set; }
|
internal HashSet<BookContributor> ContributorsLink { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@ -149,6 +149,8 @@ namespace DtoImporterService
|
|||||||
{
|
{
|
||||||
var item = importItem.DtoItem;
|
var item = importItem.DtoItem;
|
||||||
|
|
||||||
|
book.UpdateLengthInMinutes(item.LengthInMinutes);
|
||||||
|
|
||||||
// Update the book titles, since formatting can change
|
// Update the book titles, since formatting can change
|
||||||
book.UpdateTitle(item.Title, item.Subtitle);
|
book.UpdateTitle(item.Title, item.Subtitle);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user