GithubHelp home page GithubHelp logo

TvShow missing data about tmdblib HOT 6 CLOSED

jellyfin avatar jellyfin commented on June 1, 2024
TvShow missing data

from tmdblib.

Comments (6)

LordMike avatar LordMike commented on June 1, 2024

Could you post some example code?
For example,
Client.GetTvShow(1396); // breaking bad

... Doesn't give all nulls.

from tmdblib.

rboy1 avatar rboy1 commented on June 1, 2024

TvShow show = client.GetTvShow(2734);

There are 16 season objects returned full of nulls. But I use client.GetTvSeason and cycle through each season I get the correct information back. Same for episodes

from tmdblib.

LordMike avatar LordMike commented on June 1, 2024

I see what you mean now.
That information isn't disclosed by TMDb via that API call, but we share the object with GetTvSeason(). So you'll see nulls when you go through GetTvShow().

So unfortunately, it's expected behaviour, as I don't recall there being an option to change this / request all seasons immediately. I'll make a ticket, however, to split the object in two so that others don't get confused. Thanks for reporting :)

from tmdblib.

rboy1 avatar rboy1 commented on June 1, 2024

I didn't understand what you mean by splitting the object into two.
How about TMDBLib internally calling GetTVSeason and GetTvEspisides in a loop to get all the season and spisodes objects and populate them when GetTvShow is called. (it's the end objective that matter and that also makes coding easier from a dev's perspective, took me hours to get thw whole thing working and understand why it wasn't in the firts palce)

from tmdblib.

LordMike avatar LordMike commented on June 1, 2024

I'd like to keep the library to one-method for one-apicall.

Although I agree that you shouldn't have gotten the impression that you could've gotten some information, which you didn't get. The consequences of doing what you suggest could be another series of very hard to track bugs, where users end up exhausting their quota. That, or we'd add it as an option, autoFetchSeasons = true|false, and then we'd have more maintenance / a documentation problem telling users they missed that option.

If you just want the seasons. You could always do:

List<TvSeason> seasons = client.GetTvShow(2734).Seasons.Select(s => client.GetTvSeason(2734, s.SeasonNumber)).ToList();

Or in parallel:

List<TvSeason> seasons = client.GetTvShow(2734).Seasons.AsParallel().Select(s => client.GetTvSeason(2734, s.SeasonNumber)).ToList();

from tmdblib.

rboy1 avatar rboy1 commented on June 1, 2024

Won't that cause a timeout doing in parallel due to rate limitation?
I love the optional flag idea

On Apr 19, 2014, at 11:17 AM, Michael Bisbjerg [email protected] wrote:

I'd like to keep the library to one-method for one-apicall.

Although I agree that you shouldn't have gotten the impression that you could've gotten some information, which you didn't get. The consequences of doing what you suggest could be another series of very hard to track bugs, where users end up exhausting their quota. That, or we'd add it as an option, autoFetchSeasons = true|false, and then we'd have more maintenance / a documentation problem telling users they missed that option.

If you just want the seasons. You could always do:

List seasons = client.GetTvShow(2734).Seasons.Select(s => client.GetTvSeason(2734, s.SeasonNumber)).ToList();
Or in parallel:

List seasons = client.GetTvShow(2734).Seasons.AsParallel().Select(s => client.GetTvSeason(2734, s.SeasonNumber)).ToList();

Reply to this email directly or view it on GitHub.

from tmdblib.

Related Issues (20)

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.