Comments (17)
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.
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.
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.
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.
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.
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.
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.
Everything is working. Thanks again and again I'm sorry I bothered you.
from node-tvdb.
Not at all! Thanks for reaching out. Really happy I could help!
from node-tvdb.
Also, in case you're curious, the reason getSeriesByName
worked was because it doesn't need or use an API key :)
from node-tvdb.
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.
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.
A quick question. Do you know why the getTime call is there? When would it be useful?
from node-tvdb.
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.
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.
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.
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)
- Version 10 of node.js has been released
- An in-range update of nock is breaking the build π¨ HOT 1
- An in-range update of nock is breaking the build π¨ HOT 2
- An in-range update of mocha is breaking the build π¨ HOT 5
- An in-range update of jsdoc is breaking the build π¨ HOT 4
- An in-range update of sinon is breaking the build π¨ HOT 2
- An in-range update of mocha is breaking the build π¨ HOT 1
- An in-range update of eslint-plugin-mocha is breaking the build π¨ HOT 2
- An in-range update of eslint is breaking the build π¨ HOT 4
- An in-range update of sinon-chai is breaking the build π¨ HOT 1
- An in-range update of nock is breaking the build π¨ HOT 5
- Release with index.d.ts HOT 2
- Node engine compatibility HOT 3
- Error: Text data outside root node HOT 3
- HTTP errors are not handled HOT 4
- `getSeriesByName` fails if the name needs to be URL-encoded HOT 1
- Website issues HOT 2
- Typo in documentation HOT 1
- An in-range update of mocha is breaking the build π¨ HOT 1
- Access-Control-Allow-Origin HOT 2
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 node-tvdb.