Skip to content

Commit

Permalink
Fixed http errors for livechart cache loader
Browse files Browse the repository at this point in the history
  • Loading branch information
manami-project committed May 31, 2022
1 parent e2ccb64 commit ecbbebe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import io.github.manamiproject.modb.anisearch.AnisearchDownloader
import io.github.manamiproject.modb.anisearch.AnisearchRelationsConfig
import io.github.manamiproject.modb.core.collections.SortedList
import io.github.manamiproject.modb.core.config.Hostname
import io.github.manamiproject.modb.core.httpclient.DefaultHttpClient
import io.github.manamiproject.modb.core.httpclient.HttpProtocol.HTTP_1_1
import io.github.manamiproject.modb.core.logging.LoggerDelegate
import io.github.manamiproject.modb.core.models.Anime
import io.github.manamiproject.modb.core.models.Tag
Expand Down Expand Up @@ -57,7 +59,16 @@ internal class DefaultAnimeCache(
converter = AnisearchConverter(relationsDir = anisearchRelationsDir)
),
KitsuCacheLoader(),
SimpleCacheLoader(LivechartConfig, LivechartDownloader(LivechartConfig), LivechartConverter()),
SimpleCacheLoader(
config = LivechartConfig,
downloader = LivechartDownloader(
config = LivechartConfig,
httpClient = DefaultHttpClient(
protocols = listOf(HTTP_1_1),
)
),
converter = LivechartConverter(),
),
SimpleCacheLoader(MalConfig, MalDownloader(MalConfig), MalConverter()),
DependentCacheLoader(
config = NotifyConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class AnimeCachePopulator(
override fun populate(cache: Cache<URI, CacheEntry<Anime>>) {
log.info {"Populating cache with anime from [$uri]." }

val parsedAnime =parser.parse(uri.toURL())
val parsedAnime = parser.parse(uri.toURL())

parsedAnime.forEach { anime ->
anime.sources.forEach { source ->
Expand Down

0 comments on commit ecbbebe

Please sign in to comment.