Git Product home page Git Product logo

tmdb-kotlin's People

Contributors

chrisbanes avatar chriskruegerdev avatar dekan avatar dependabot[bot] avatar drewcarlson avatar jcminarro avatar p-stringer avatar stevesoltys avatar thesandipv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tmdb-kotlin's Issues

Getting all Genres

Hi,

Are you still planning to implement the TmdbGenresApi and provide IDs for all the various Movies/TV genres? Would be really helpful.

Thanks

Long Movie names are not shown properly

In the Moviebase app some movie names like "Batman: The doom that came to Gotham" only shows "Batman: The doom that came to". I'm sure it is done to prevent text from overflowing and wrecking the overall structure, but i think it can easily be fixed with little to no efforts.
Screenshot_20230830_113952_Moviebase

tmdbAuthCredentials should be userAuthentication

In the README.md file, it is stated that 'tmdbAuthCredentials' can be used directly in the project. However, this variable is defined as internal, which means it cannot be accessed directly. Instead, a method called 'userAuthentication' has been defined, and the content of 'tmdbAuthCredentials' needs to be changed through this method. You need to change just README.md file for misinformation.

MissingFieldException: 'known_for_department'

I'm getting an exception with v0.6.3 when calling
Tmdb3.find.find("tt11271038", "en", TmdbExternalSource.IMDB)

Stacktrace:

    kotlinx.serialization.MissingFieldException: 
     Field 'known_for_department' is required for type with serial name 'app.moviebase.tmdb.model.TmdbCrew', but it was missing
        at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20)
        at app.moviebase.tmdb.model.TmdbCrew.<init>(TmdbPeopleModel.kt:115)
        at app.moviebase.tmdb.model.TmdbCrew$$serializer.deserialize(TmdbPeopleModel.kt:115)
        at app.moviebase.tmdb.model.TmdbCrew$$serializer.deserialize(TmdbPeopleModel.kt:115)

TmdbVideoType does not contain element with name 'Bloopers'

Hi, I need some advice I don't know if I'm making a mistake somewhere but, whenever I try to get information about a movie, it throws me a mistake

Try for example Avengers: Endgame TMDb ID = 299534

It throws an error: app.moviebase.tmdb.model.TmdbVideoType does not contain element with name 'Bloopers'

my method is

`   private suspend fun fetchMovie(movieId: Int): TmdbMovieDetail? {

    return try {
        tmdbApi.movies.getDetails(
            movieId,
            "en-US",
            listOf(
                AppendResponse.EXTERNAL_IDS,
                AppendResponse.CREDITS,
                AppendResponse.RELEASES_DATES,
                AppendResponse.IMAGES,
                AppendResponse.MOVIE_CREDITS,
                AppendResponse.VIDEOS,
                AppendResponse.CONTENT_RATING,
                AppendResponse.WATCH_PROVIDERS
            )
        )
    } catch (e: ResponseException) {
        if (e.response.status == HttpStatusCode.NotFound) null else throw e
    }
}

`

Process: com.octopus.mplay, PID: 25580
kotlinx.serialization.SerializationException: app.moviebase.tmdb.model.TmdbVideoType does not contain element with name 'Bloopers'
at kotlinx.serialization.json.internal.JsonNamesMapKt.getJsonNameIndexOrThrow(JsonNamesMap.kt:63)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeEnum(StreamingJsonDecoder.kt:265)
at app.moviebase.tmdb.model.TmdbVideoType$$serializer.deserialize(TmdbModel.kt:108)
at app.moviebase.tmdb.model.TmdbVideoType$$serializer.deserialize(TmdbModel.kt:108)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:36)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
at app.moviebase.tmdb.model.TmdbVideo$$serializer.deserialize(TmdbModel.kt:141)
at app.moviebase.tmdb.model.TmdbVideo$$serializer.deserialize(TmdbModel.kt:141)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:36)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:535)
at kotlinx.serialization.internal.ListLikeSerializer.readElement(CollectionSerializers.kt:80)
at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:51)
at kotlinx.serialization.internal.AbstractCollectionSerializer.merge(CollectionSerializers.kt:36)
at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:43)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:36)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
at app.moviebase.tmdb.model.TmdbResult$$serializer.deserialize(TmdbModel.kt:49)
at app.moviebase.tmdb.model.TmdbResult$$serializer.deserialize(TmdbModel.kt:49)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:36)
at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
at kotlinx.serialization.encoding.AbstractDecoder.decodeNullableSerializableElement(AbstractDecoder.kt:79)
at app.moviebase.tmdb.model.TmdbMovieDetail$$serializer.deserialize(TmdbMovieModel.kt:61)
at app.moviebase.tmdb.model.TmdbMovieDetail$$serializer.deserialize(TmdbMovieModel.kt:61)
at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:36)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:100)
at io.ktor.serialization.kotlinx.KotlinxSerializationConverter.deserialize(KotlinxSerializationConverter.kt:55)
at io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invokeSuspend(ContentNegotiation.kt:135)
at io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invoke(Unknown Source:13)
2022-06-11 22:53:24.305 25580-25616/com.octopus.mplay E/AndroidRuntime: at io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin$install$2.invoke(Unknown Source:6)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at io.ktor.client.HttpClient$4.invokeSuspend(HttpClient.kt:170)
at io.ktor.client.HttpClient$4.invoke(Unknown Source:11)
at io.ktor.client.HttpClient$4.invoke(Unknown Source:6)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at io.ktor.util.pipeline.SuspendFunctionGun.proceedWith(SuspendFunctionGun.kt:91)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invokeSuspend(HttpCallValidator.kt:140)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invoke(Unknown Source:13)
at io.ktor.client.plugins.HttpCallValidator$Companion$install$2.invoke(Unknown Source:6)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SuspendFunctionGun.kt:101)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:77)
at io.ktor.client.call.HttpClientCall.body(HttpClientCall.kt:87)
at app.moviebase.tmdb.api.TmdbMoviesApi.getDetails(TmdbMoviesApi.kt:61)
at app.moviebase.tmdb.api.TmdbMoviesApi$getDetails$1.invokeSuspend(Unknown Source:16)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Add support for endpoints

Add the model and add the endpoints for:

  • TmdbCertificationsApi
  • TmdbChangesApi
  • TmdbCreditsApi
  • TmdbGenresApi
  • TmdbGuestSessionsApi
  • TmdbKeywordsApi
  • TmdbListsApi
  • TmdbReviewsApi
  • TmdbShowEpisodeGroupsApi

Update README

  • Add configuration
  • Add error handling
  • Provide more examples of usage

Crash due to missing gender

When calling:

Tmdb3.find.find("tt10919380", "en", TmdbExternalSource.IMDB)

I get an error:

app.moviebase.tmdb.model.TmdbGender does not contain element with name '3'

It would probably be fixed by adding the following to TmdbGender:

@SerialName("3")
NON_BINARY(3),

Thank you!

Release dates parsed incorrectly

All the TmdbReleaseDate obtained by calling movies.getDetails on a Tmdb3, with AppendResponse.RELEASES_DATES, contain a null releaseDate.

I suspect it's because of a bug in LocalDateTimeSerializer: the class tries to parse the String as an instant, which it is, but then ignores the result, see this line.

An example of String being parsed to null is 1993-07-08T00:00:00.000Z: toInstant() works, while toLocalDateTime() errors out with:

java.time.format.DateTimeParseException: Text '1993-07-08T00:00:00.000Z' could not be parsed, unparsed text found at index 23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.