Persist keys to db. Necessary in the event that download succeeds then decrypt fails.
This commit is contained in:
parent
0306c958d1
commit
9416f4e040
@ -119,5 +119,13 @@ namespace ApplicationServices
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// I hate how unintuitive this is to use/remember. Will hopefully be cleaned up in a future comprehensive data strategy overhaul
|
||||||
|
public static void UpdateBook(Book book)
|
||||||
|
{
|
||||||
|
using var context = DbContexts.GetContext();
|
||||||
|
context.Update(book);
|
||||||
|
context.SaveChanges();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,6 +51,8 @@ namespace FileLiberator
|
|||||||
|
|
||||||
libraryBook.Book.AudibleKey = dlLic.AudibleKey;
|
libraryBook.Book.AudibleKey = dlLic.AudibleKey;
|
||||||
libraryBook.Book.AudibleIV = dlLic.AudibleIV;
|
libraryBook.Book.AudibleIV = dlLic.AudibleIV;
|
||||||
|
// persist changes
|
||||||
|
ApplicationServices.LibraryCommands.UpdateBook(libraryBook.Book);
|
||||||
|
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
client.DefaultRequestHeaders.Add("User-Agent", Resources.UserAgent);
|
client.DefaultRequestHeaders.Add("User-Agent", Resources.UserAgent);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user