Giter Site home page Giter Site logo

Comments (17)

edwellbrook avatar edwellbrook commented on July 25, 2024

Hey, really sorry it's not clear.

The tvdb.getBanners method will return an array of objects of this format (as I'm sure you've discovered):

{
    id: '74141',
    BannerPath: 'fanart/original/73255-33.jpg',
    BannerType: 'fanart',
    BannerType2: '1280x720',
    Colors: '|57,57,57|27,17,15|48,31,23|',
    Language: 'en',
    Rating: '6.8636',
    RatingCount: '22',
    SeriesName: 'false',
    ThumbnailPath: '_cache/fanart/original/73255-33.jpg',
    VignettePath: 'fanart/vignette/73255-33.jpg'
}

The BannerPath key should be appended to "http://thetvdb.com/banners/", so the above example will be "http://thetvdb.com/banners/fanart/original/73255-33.jpg".

TheTVDB doesn't provide a list of mirrors for the banners as far as I know, so I will likely add in the base url there by default in the future.

Hope this clears things up and answers your question.

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

I just noticed the getBanners call. I was used to another library that had a getMirrors call.

Anyway, now I can't get the getBanners call to work. Here is my call and the result ...

tvdb.getBanners id, (err, res) ->
  console.log 'getBanners', {id, err, res}

tvdb: getBanners { id: '269593',
  err: { [Error: Could not complete the request] statusCode: 404 },
  res: undefined }

I got the id from here ...

  tvdb.getSeriesByName name, (err, res) ->
    console.log res

   [ { seriesid: '269593',
       language: 'en',
       SeriesName: 'About a Boy',
       banner: 'graphical/269593-g7.jpg',
       Overview: 'Based on the best-selling Nick Hornby novel, written/produced by Jason Katims and directed by Jon Favreau comes a different kind of coming-of-age story. Will Freeman lives a charmed existence as the ultimate man-child. After writing a hit song, he was granted a life of free time, free love and freedom from financial woes. He’s single, unemployed and loving it. So imagine his surprise when Fiona, a needy, single mom and her oddly charming 11-year-old son Marcus move in next door and disrupt his perfect world.',
       FirstAired: '2014-02-22',
       Network: 'NBC',
       IMDB_ID: 'tt2666270',
       zap2it_id: 'EP01738426',
       id: '269593' } ] }

I'll try to trace through the code. Thanks in advance...

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

I sent that before I got your reply. Thanks. I'll try to trace down the 404.

Edit: I got the 404 with your sample id of 74141 also. Something fishy is going on. I'll keep playing with this.

from node-tvdb.

edwellbrook avatar edwellbrook commented on July 25, 2024

oh, that's really odd. seems to work fine for me running:

tvdb.getBanners('269593', function(err, res) {})

Do let me know how you get on.

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

I found the problem. In compat/index/getBanners @token had a value of XXXXXXXXXX". Note the extra quote.

However, the banners result from tvdb was an empty array when using your sample id. I'll continue to beat on this.

from node-tvdb.

edwellbrook avatar edwellbrook commented on July 25, 2024

The sample id you're using (74141) is the id for the banner image. The id for the series in that example is 73255.

That looks like it might be your api key (edited comment above for you). Perhaps there was an error on your end when initialising the library?

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

Hah! Sorry. The quote was from my code. I don't know how getSeriesByName worked.

Weird. I'll continue to chase this. Sorry to bother you so much.

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

Everything is working. Thanks again and again I'm sorry I bothered you.

from node-tvdb.

edwellbrook avatar edwellbrook commented on July 25, 2024

Not at all! Thanks for reaching out. Really happy I could help!

from node-tvdb.

edwellbrook avatar edwellbrook commented on July 25, 2024

Also, in case you're curious, the reason getSeriesByName worked was because it doesn't need or use an API key :)

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

Aha. That gave me the false idea that I had the key right. By the time I'm done I'll be an expert on your code. Maybe I can contribute something someday. :-)

from node-tvdb.

edwellbrook avatar edwellbrook commented on July 25, 2024

Sorry that wasn't clear either! Please do. If there's anything that could be done to make things clearer for you, please open an issue or pull request with some suggestions :)

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

A quick question. Do you know why the getTime call is there? When would it be useful?

from node-tvdb.

edwellbrook avatar edwellbrook commented on July 25, 2024

Not needed for most use cases, but theres an example of its use here (see initial database processing section)

http://thetvdb.com/wiki/index.php/Programmers_API

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

I'm sorry to be a pain but I can't find other url headers like "http://thetvdb.com/banners/". I looked in the tvdb wiki with no luck.

I specifically need it for episode.filename (episodes/269593/4570034.jpg), which I assume is the episode thumbnail, and actor.Image (actors/326286.jpg).

I tried http://thetvdb.com/episodes/269593/4570034.jpg and http://thetvdb.com/actors/326286.jpg and got 404s.

from node-tvdb.

edwellbrook avatar edwellbrook commented on July 25, 2024

No worries. You want to use "http://thetvdb.com/banners/" + banner where banner is something like "episodes/269593/4570034.jpg".

Those urls do not work, but http://thetvdb.com/banners/episodes/269593/4570034.jpg, for example does. Notice the entirety of "http://thetvdb.com/banners/" is in the url used.

Hope this clarifies things!

from node-tvdb.

mark-hahn avatar mark-hahn commented on July 25, 2024

Thanks. I didn't think to try that.

On Sun, Dec 6, 2015 at 3:05 PM, Ed Wellbrook [email protected]
wrote:

No worries. You want to use "http://thetvdb.com/banners/" + banner where
banner is something like "episodes/269593/4570034.jpg".

Those urls do not work, but
http://thetvdb.com/banners/episodes/269593/4570034.jpg, for example does.
Notice the entirety of "http://thetvdb.com/banners/" is in the url used.

Hope this clarifies things!

β€”
Reply to this email directly or view it on GitHub
#27 (comment)
.

from node-tvdb.

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.