-
-
Notifications
You must be signed in to change notification settings - Fork 883
Conversation
data/legacy/src/main/java/app/tivi/data/mappers/TmdbShowDetailToTiviShow.kt
Outdated
Show resolved
Hide resolved
data/relatedshows/src/main/java/app/tivi/data/relatedshows/TmdbRelatedShowsDataSourceImpl.kt
Outdated
Show resolved
Hide resolved
Two things to add in the TMDB lib:
For TMDB, there isn't a request limit anymore. So we don't need an extra retry mechanism. See https://developers.themoviedb.org/3/getting-started/request-rate-limiting However, you may want to handle exceptions from the ktor request (ResponseException). |
Nice. The retry handling was more for Trakt iirc. Another thing I was thinking about was re-using my OkHttp client. Currently the creation of the Ktor client is private in Tmdb3, so I can't set the http engine. Maybe we could add a |
I thought something similar. For the entire OkHttp engine support, we need to open the library more. We can pass your own HTTP client instance and add the TMDB config on top. |
Not necessarily. We can just rely on the implicit engine discovery (https://ktor.io/docs/http-client-engines.html#default), which is what I'm using right now. The important part is being able to configure the client underneath, through the It should work with ChrisKruegerDev/tmdb-kotlin#27 like so (although I haven't tested it):
|
Yes, this should work 👍 It feels a bit risky to rely on the selected engine from the current source set. Ktor looks for the first engine:
I added the following config ChrisKruegerDev/tmdb-kotlin#28. I haven't tested the code, but it should work:
|
Rebase failed
# Conflicts: # data/test/src/test/java/app/tivi/data/DatabaseTest.kt
Fixes #1092