159 lines
9.1 KiB
Plaintext
159 lines
9.1 KiB
Plaintext
-- begin CONFIG FILES ---------------------------------------------------------------------------------------------------------------------
|
|
.\appsettings.json should only be a pointer to the real settings file location: LibationSettings.json
|
|
replace complex config saving throughout with new way in my ConsoleDependencyInjection solution
|
|
all settings should be strongly typed
|
|
re-create my shortcuts and bak
|
|
|
|
multiple files named "appsettings.json" will overwrite each other
|
|
libraries should avoid this generic name. ok for applications to use them
|
|
|
|
Audible API
|
|
C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\audible api\AudibleApi\_Tests\AudibleApi.Tests\bin\Debug\netcoreapp3.0\L1
|
|
C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\audible api\AudibleApi\_Tests\AudibleApi.Tests\bin\Debug\netcoreapp3.0\ComputedTestValues
|
|
14+ json files
|
|
these can go in a shared solution folder
|
|
BasePath => recursively search directories upward-only until fild dir with .sln
|
|
from here can set up a shared dir anywhere. use recursive upward search to find it. store shared files here. eg: identityTokens.json, ComputedTestValues
|
|
-- end CONFIG FILES ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin REPLACE SCRAPING WITH API ---------------------------------------------------------------------------------------------------------------------
|
|
integrate API into libation. eventually entirely replace all other authentication methods, audible communication. incl book download
|
|
logged-in user's own ratings (aka rating-star(s)) -- is "provided_review"
|
|
unlike traditional scraping, audible api calls do not need to be humanized. can likely delete humanizer altogether. still needed for downloading pdf.s?
|
|
|
|
incl episodes. eg: "Bill Bryson's Appliance of Science"
|
|
refining episode retrieval might also get rid of the need for IsEpisodes property
|
|
replace all scraping with audible api
|
|
public partial class ScanLibraryDialog : Form, IIndexLibraryDialog
|
|
public async Task DoMainWorkAsync()
|
|
using var pageRetriever = websiteProcessorControl1.GetPageRetriever();
|
|
jsonFilepaths = await DownloadLibrary.DownloadLibraryAsync(pageRetriever).ConfigureAwait(false);
|
|
|
|
move old DTOs back into scraping so it's easier to move them all to new legacy area
|
|
library to return strongly typed LibraryApiV10
|
|
|
|
note: some json importing may still be relevant. might want to allow custom importing
|
|
|
|
scraping stuff to remove:
|
|
order matters. go from top to bottom:
|
|
|
|
REMOVED PROJECT REFERENCES
|
|
3.2 Domain Utilities (post database)
|
|
DomainServices
|
|
AudibleDotComAutomation
|
|
3.1 Domain Internal Utilities
|
|
InternalUtilities
|
|
Scraping
|
|
|
|
REMOVED PROJECTS
|
|
2 Utilities (domain ignorant)
|
|
Scraping
|
|
AudibleDotComAutomation
|
|
AudibleDotCom
|
|
CookieMonster
|
|
|
|
REMOVED FILES
|
|
\Libation\InternalUtilities\UNTESTED\DataConverter.cs
|
|
\Libation\DomainServices\UNTESTED\DownloadLibrary.cs
|
|
\Libation\DomainServices\UNTESTED\ScrapeBookDetails.cs
|
|
|
|
ADDED PROJECT REFERENCES
|
|
3.1 Domain Internal Utilities
|
|
InternalUtilities
|
|
DTOs
|
|
|
|
Audible API. GET /1.0/library , GET /1.0/library/{asin}
|
|
TONS of expensive conversion: GetLibraryAsync > string > JObject > string > LibraryApiV10
|
|
-- end REPLACE SCRAPING WITH API ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin ENHANCEMENT, CATEGORIES ---------------------------------------------------------------------------------------------------------------------
|
|
add support for multiple categories
|
|
when i do this, learn about the different CategoryLadder.Root enums. probably only need Root.Genres
|
|
-- end ENHANCEMENT, CATEGORIES ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin LEGACY ---------------------------------------------------------------------------------------------------------------------
|
|
retain legacy functionality in out-of-the-way area. turn on/off in settings?
|
|
|
|
> scraping code
|
|
> "legacy inAudible wire-up code"
|
|
-- end LEGACY ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin CLEAN UP ARCHITECTURE ---------------------------------------------------------------------------------------------------------------------
|
|
my ui sucks. it's also tightly coupled with biz logic. can't replace ui until biz logic is extracted and loosely. remove all biz logic from presentation/winforms layer
|
|
-- end CLEAN UP ARCHITECTURE ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin UNIT TESTS ---------------------------------------------------------------------------------------------------------------------
|
|
all "UNTESTED" code needs unit tests
|
|
Turn into unit tests or demos
|
|
TextBoxBaseTextWriter.cs
|
|
EnumerationExamples.cs
|
|
EnumExt.cs
|
|
IEnumerable[T]Ext.cs
|
|
MultiTextWriter.cs
|
|
Selenium.Examples.cs
|
|
ScratchPad.cs
|
|
ProcessorAutomationController.Examples.cs
|
|
ScraperRules.Examples.cs
|
|
ByFactory.Example.cs
|
|
search 'example code' on: LibationWinForm\...\Form1.cs
|
|
EnumerationFlagsExtensions.EXAMPLES()
|
|
// examples
|
|
-- end UNIT TESTS ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin DECRYPTING ---------------------------------------------------------------------------------------------------------------------
|
|
replace inaudible/inaudible lite with pure ffmpeg
|
|
benefits of inaudible:
|
|
highly configurable
|
|
embedded cover image
|
|
chapter-ized
|
|
cue and nfo files
|
|
can hopefully get most of this with simple decrypt. possibly including the new chapter titles
|
|
|
|
better chapters in many m4b files. to see, try re-downloading. examples: bobiverse, sharp objects
|
|
|
|
raw ffmpeg decrypting is significantly faster than inAudible/AaxDecrypter method:
|
|
inAudible/AaxDecrypter
|
|
tiny file
|
|
40 sec decrypt
|
|
40 sec chapterize + tag
|
|
huge file
|
|
60 sec decrypt
|
|
120 sec chapterize + tag
|
|
directly call ffmpeg (decrypt only)
|
|
tiny file
|
|
17 sec decrypt
|
|
huge file
|
|
39 sec decrypt
|
|
-- end DECRYPTING ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin ENHANCEMENT, UI: LONG RUNNING TASKS ---------------------------------------------------------------------------------------------------------------------
|
|
long running tasks are appropriately async. however there's no way for the user to see that the task is running (vs nothing happened) except to wait and see if the final notification ever comes
|
|
-- end ENHANCEMENT, UI: LONG RUNNING TASKS ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin ENHANCEMENT, PERFORMANCE: TAGS ---------------------------------------------------------------------------------------------------------------------
|
|
tag edits still take forever and block UI
|
|
unlikely to be an issue with file write. in fact, should probably roll back this change
|
|
also touches parts of code which: db write via a hook, search engine re-index
|
|
-- end ENHANCEMENT, PERFORMANCE: TAGS ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin ENHANCEMENT, PERFORMANCE: GRID ---------------------------------------------------------------------------------------------------------------------
|
|
when a book/pdf is NOT liberated, calculating the grid's [Liberated][NOT d/l'ed] label is very slow
|
|
-- end ENHANCEMENT, PERFORMANCE: GRID ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin ENHANCEMENT: REMOVE BOOK ---------------------------------------------------------------------------------------------------------------------
|
|
how to remove a book?
|
|
previously difficult due to implementation details regarding scraping and importing. should be trivial after api replaces scraping
|
|
-- end ENHANCEMENT: REMOVE BOOK ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin ENHANCEMENT: NEW VIEWS ---------------------------------------------------------------------------------------------------------------------
|
|
menu views. filter could work for grid display; just use the lucene query language
|
|
1) menu to show all tags and count of each. click on tag so see only those books
|
|
2) tree to show all categories and subcategories. click on category so see only those books
|
|
-- end ENHANCEMENT: NEW VIEWS ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- begin ENHANCEMENT: LOGGING, ERROR HANDLING ---------------------------------------------------------------------------------------------------------------------
|
|
LibationWinForm and Audible API need better logging and error handling
|
|
incl log levels, db query logging
|
|
see AaxDecryptorWinForms.initLogging()
|
|
-- end ENHANCEMENT: LOGGING ---------------------------------------------------------------------------------------------------------------------
|