Minor mods for future UI changes
This commit is contained in:
parent
e0248c2d8e
commit
936a1d60a0
10 changed files with 21 additions and 10 deletions
|
|
@ -14,6 +14,7 @@ namespace FileLiberator
|
|||
{
|
||||
public class ConvertToMp3 : AudioDecodable
|
||||
{
|
||||
public override string Name => "Convert to Mp3";
|
||||
private Mp4File m4bBook;
|
||||
|
||||
private long fileSize;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ namespace FileLiberator
|
|||
{
|
||||
public class DownloadDecryptBook : AudioDecodable
|
||||
{
|
||||
public override string Name => "Download & Decrypt";
|
||||
private AudiobookDownloadBase abDownloader;
|
||||
|
||||
public override bool Validate(LibraryBook libraryBook) => !libraryBook.Book.Audio_Exists;
|
||||
|
|
@ -65,7 +66,9 @@ namespace FileLiberator
|
|||
foreach (var tmpFile in entries.Where(f => f.FileType != FileType.AAXC))
|
||||
FileUtility.SaferDelete(tmpFile.Path);
|
||||
|
||||
return new StatusHandler { "Decrypt failed" };
|
||||
return abDownloader?.IsCanceled == true ?
|
||||
new StatusHandler { "Cancelled" } :
|
||||
new StatusHandler { "Decrypt failed" };
|
||||
}
|
||||
|
||||
// moves new files from temp dir to final dest
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ namespace FileLiberator
|
|||
{
|
||||
public class DownloadPdf : Processable
|
||||
{
|
||||
public override string Name => "Download Pdf";
|
||||
public override bool Validate(LibraryBook libraryBook)
|
||||
=> !string.IsNullOrWhiteSpace(getdownloadUrl(libraryBook))
|
||||
&& !libraryBook.Book.PDF_Exists;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace FileLiberator
|
|||
{
|
||||
public abstract class Processable : Streamable
|
||||
{
|
||||
public abstract string Name { get; }
|
||||
public event EventHandler<LibraryBook> Begin;
|
||||
|
||||
/// <summary>General string message to display. DON'T rely on this for success, failure, or control logic</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue