Comments (6)
Could you post some example code?
For example,
Client.GetTvShow(1396); // breaking bad
... Doesn't give all nulls.
from tmdblib.
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.
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.
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.
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.
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)
- Small changes from TMDb cause bug HOT 3
- Video class missing Official and PublishedAt HOT 2
- MediaType for episode changes to tv_episode
- Test API key HOT 4
- Error converting value {null} to type 'System.Double'. Path 'popularity'
- Person NullReferenceException for TaggedImage
- DiscoverMovie missing 'with_release_type' parameter HOT 1
- The SSL connection could not be established HOT 1
- GetTrendingMoviesAsync() calling a non-working URL HOT 9
- Updated TranslationData model in Nuget Package HOT 1
- MediaType error
- DiscoverMoviesAsync().IncludeWithAnyProviders() missing :'(
- Deserialization fails for Popular Persons data
- Add V4..
- Support native names in countries
- Security Vulnerability in Newtonsoft.Json 9.0.1 HOT 3
- RobiniaDocs API Explorer
- Update official Nuget with latest dependencies
- DiscoverTv.cs > WhereGenresExclude calls WhereGenresInclude
- some rudimentary tooling to deal with provider ids HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmdblib.