maddox / tvdb_party

Simple Ruby library to talk to thetvdb.com
MIT License
72 stars 39 forks source link

get_seasons #21

Open butnaruandrei opened 9 years ago

butnaruandrei commented 9 years ago

there is no method "get_seasons"

NoMethodError: undefined method `get_seasons' for #TvdbParty::Search:0x007ffa4708f518

mcdonagg commented 9 years ago

Whats are you trying to do?

butnaruandrei commented 9 years ago

I want to get all seasons for Supernatural TV Series Example:

s = tvdb.get_series_by_id tvdb.search('Supernatural').select{ |s| s["SeriesName"] == "Supernatural"}.first["seriesid"]

When I try s.seasons I get that error NoMethodError: undefined methodget_seasons' for #TvdbParty::Search:0x007ffa4708f518`

mcdonagg commented 9 years ago

what do you mean by all seasons? like a list of 1,2,3,4,5..10 or a list of season IDs or something else? tvdb dosent really offer an easy way to get a list of seasons so I am just trying to figure out what you need and if there is another way to get it

butnaruandrei commented 9 years ago

I want something like s.episodes, a method that will return all details for all the seasons

mcdonagg commented 9 years ago

sadly there isnt something like this, what kind of info from the seasons do you need? Seasons dont really have info besides maybe a poster and a number

mcdonagg commented 9 years ago

with more info I may be able to help

butnaruandrei commented 9 years ago

at least I can get the number of seasons?

mcdonagg commented 9 years ago

that turns out to be a pain, there is a debate on TheTVDB forum on how best to do this, you can sort through the episodes taking the highest season, or simple count the seasons, the way I use to get this info is odd but you could try it, you can use another api: http://services.tvrage.com/tools/quickinfo.php?show=Supernatural and then get the season number of the latest episode

mcdonagg commented 9 years ago

may I ask how you will use that info? because in my use of data from tvdb I rarely need to use that number.

butnaruandrei commented 9 years ago

At this moment, I don't have any idea what I want that feature. I just found that error and I thought to report this problem. Thanks for the fast reply.

mcdonagg commented 9 years ago

yep, I think the error is there because providing that info was talked about by theTVDB and so tvdb_party started to implement a way to use that info but then theTVDB didnt ever implement it. But as I said seasons dont really have any info the most I can think of is images and a number. That info can be gained from other ways. If you have any questions just ask :)