From c61bc27a7bdbc343a7cd1114769c0bbd2ec0986e Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Tue, 5 Nov 2019 08:19:58 -0500 Subject: [PATCH] This version is powered by the Audible API. Legacy scraping code is still present but is commented out. All future check-ins are not guaranteed to have any scraping code --- .../ApplicationServices.csproj | 0 .../UNTESTED}/LibraryIndexer.cs | 0 .../UNTESTED}/SearchEngineActions.cs | 0 DtoImporterService/LibraryImporter.cs | 1 + Libation.sln | 2 +- LibationWinForm/UNTESTED/Form1.cs | 2 +- REFERENCE.txt | 5 +++-- ScrapingDomainServices/UNTESTED/DownloadBook.cs | 2 +- __TODO.txt | 10 +++------- 9 files changed, 10 insertions(+), 12 deletions(-) rename ApplicationService/ApplicationService.csproj => ApplicationServices/ApplicationServices.csproj (100%) rename {ApplicationService => ApplicationServices/UNTESTED}/LibraryIndexer.cs (100%) rename {ApplicationService => ApplicationServices/UNTESTED}/SearchEngineActions.cs (100%) diff --git a/ApplicationService/ApplicationService.csproj b/ApplicationServices/ApplicationServices.csproj similarity index 100% rename from ApplicationService/ApplicationService.csproj rename to ApplicationServices/ApplicationServices.csproj diff --git a/ApplicationService/LibraryIndexer.cs b/ApplicationServices/UNTESTED/LibraryIndexer.cs similarity index 100% rename from ApplicationService/LibraryIndexer.cs rename to ApplicationServices/UNTESTED/LibraryIndexer.cs diff --git a/ApplicationService/SearchEngineActions.cs b/ApplicationServices/UNTESTED/SearchEngineActions.cs similarity index 100% rename from ApplicationService/SearchEngineActions.cs rename to ApplicationServices/UNTESTED/SearchEngineActions.cs diff --git a/DtoImporterService/LibraryImporter.cs b/DtoImporterService/LibraryImporter.cs index 120cba7c..776c3184 100644 --- a/DtoImporterService/LibraryImporter.cs +++ b/DtoImporterService/LibraryImporter.cs @@ -29,6 +29,7 @@ namespace DtoImporterService var libraryBook = new LibraryBook( context.Books.Local.Single(b => b.AudibleProductId == newItem.ProductId), newItem.DateAdded +// needed for scraping //,FileManager.FileUtility.RestoreDeclawed(newLibraryDTO.DownloadBookLink) ); context.Library.Add(libraryBook); diff --git a/Libation.sln b/Libation.sln index 6476d440..f136b8be 100644 --- a/Libation.sln +++ b/Libation.sln @@ -87,7 +87,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AudibleApiDTOs.Tests", "..\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AudibleApiClientExample", "..\audible api\AudibleApi\_Demos\AudibleApiClientExample\AudibleApiClientExample.csproj", "{282EEE16-F569-47E1-992F-C6DB8AEC7AA6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationService", "ApplicationService\ApplicationService.csproj", "{B95650EA-25F0-449E-BA5D-99126BC5D730}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationServices", "ApplicationServices\ApplicationServices.csproj", "{B95650EA-25F0-449E-BA5D-99126BC5D730}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/LibationWinForm/UNTESTED/Form1.cs b/LibationWinForm/UNTESTED/Form1.cs index cf4f1c53..6feb9ceb 100644 --- a/LibationWinForm/UNTESTED/Form1.cs +++ b/LibationWinForm/UNTESTED/Form1.cs @@ -358,7 +358,7 @@ namespace LibationWinForm private async void scanLibraryToolStripMenuItem_Click(object sender, EventArgs e) { // legacy/scraping method - //await indexDialog(new ScanLibraryDialog()); +//await indexDialog(new ScanLibraryDialog()); // new/api method await indexDialog(new IndexLibraryDialog()); } diff --git a/REFERENCE.txt b/REFERENCE.txt index 3be3630e..970816d9 100644 --- a/REFERENCE.txt +++ b/REFERENCE.txt @@ -1,7 +1,8 @@ +-- begin LEGACY CODE --------------------------------------------------------------------------------------------------------------------- +-- end LEGACY CODE --------------------------------------------------------------------------------------------------------------------- + -- begin AUDIBLE DETAILS --------------------------------------------------------------------------------------------------------------------- - alternate book id (eg BK_RAND_006061) is called 'sku' , 'sku_lite' , 'prod_id' , 'product_id' in different parts of the site - -- end AUDIBLE DETAILS --------------------------------------------------------------------------------------------------------------------- -- begin SOLUTION LAYOUT --------------------------------------------------------------------------------------------------------------------- diff --git a/ScrapingDomainServices/UNTESTED/DownloadBook.cs b/ScrapingDomainServices/UNTESTED/DownloadBook.cs index e9f9e183..23359477 100644 --- a/ScrapingDomainServices/UNTESTED/DownloadBook.cs +++ b/ScrapingDomainServices/UNTESTED/DownloadBook.cs @@ -39,7 +39,7 @@ namespace ScrapingDomainServices //// var adhTitle = product.Title.Split('&')[0] // legacy/scraping method - //await performDownloadAsync(libraryBook, tempAaxFilename); +//await performDownloadAsync(libraryBook, tempAaxFilename); // new/api method tempAaxFilename = await performApiDownloadAsync(libraryBook, tempAaxFilename); diff --git a/__TODO.txt b/__TODO.txt index c63bc22d..20a191f1 100644 --- a/__TODO.txt +++ b/__TODO.txt @@ -1,11 +1,7 @@ -- begin REPLACE SCRAPING WITH API --------------------------------------------------------------------------------------------------------------------- -library import UI -move biz logic out of UI (Form1.scanLibraryToolStripMenuItem_Click) -- non-db dependent: InternalUtilities. see: SearchEngineActions - InternalUtilities.AudibleApiExtensions may not belong here. not sure -- db dependent: eg DtoImporterService - - +make a github release version +in REFERENCE.txt, say which version still has legacy scraping code in tact +remove scraping code. don't 'move' it MOVE TO LEGACY --------------