Skip to content

Commit

Permalink
#2: Use custom provider settings from command-line.
Browse files Browse the repository at this point in the history
  • Loading branch information
OOPMan committed Nov 8, 2016
1 parent 2719f21 commit 3ecd0e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object GoodreadsLibraryValueCalculator extends App {
* @return
*/
def valuate(config: Config) = {
// import com.github.oopman.goodreads.valuator.ISBNUtils._
val providers = config.providers.collect(ISBNUtils.priceProviders)
val isbnUtils = new ISBNUtils(db)

val reviewPages = isbnUtils.getAllReviews(config)
Expand Down Expand Up @@ -49,7 +49,7 @@ object GoodreadsLibraryValueCalculator extends App {
*/
val groupedISBNs = collectedISBNs.map(_.grouped(config.chunkSize).toList)

val prices = groupedISBNs.map(isbnUtils.getPricesForISBNChunks).flatMap(identity)
val prices = groupedISBNs.map(listOfSeqOfISBNs => isbnUtils.getPricesForISBNChunks(listOfSeqOfISBNs, providers)).flatMap(identity)
val isbnsAndPrices = for {
a <- collectedISBNs
b <- prices
Expand Down

0 comments on commit 3ecd0e7

Please sign in to comment.