Skip to content

Commit

Permalink
always select uploaded thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
Snd-R committed Jan 28, 2023
1 parent 3f26698 commit 2b6ac46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/org/snd/mediaserver/MetadataUpdateService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class MetadataUpdateService(
mediaServerClient.uploadBookThumbnail(
bookId = bookId,
thumbnail = thumbnail,
selected = thumbnails.all { it.type == "GENERATED" || it.id == existingMatch?.thumbnailId }
selected = true
)
}

Expand All @@ -153,7 +153,7 @@ class MetadataUpdateService(
mediaServerClient.uploadSeriesThumbnail(
seriesId = seriesId,
thumbnail = thumbnail,
selected = thumbnails.isEmpty()
selected = true
)
}

Expand Down
8 changes: 7 additions & 1 deletion src/main/kotlin/org/snd/module/MetadataModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,14 @@ class MetadataModule(
}

private fun createAnilistClient(): AniListClient {
val okHttpClient = okHttpClient.newBuilder()
.addInterceptor(HttpLoggingInterceptor { message ->
KotlinLogging.logger {}.debug { message }
}.setLevel(HttpLoggingInterceptor.Level.BASIC))
.build()

return AniListClient(
okHttpClient = okHttpClient.newBuilder().build(),
okHttpClient = okHttpClient,
name = "AniList",
rateLimiterConfig = RateLimiterConfig.custom()
.limitRefreshPeriod(Duration.ofSeconds(5))
Expand Down

0 comments on commit 2b6ac46

Please sign in to comment.