Comments (5)
Already aware, I believe @vankasteelj would update his trakt.tv
module to get the images from another source, but just to be sure I'll create a module for the Fanart.tv API so we can use that.
from popcorn-api.
I won't update trakt.tv, except remove the images call and so on. The module rests entirely on trakt, so I won't start making calls elsewhere
However, if you wish, you may take a look at trakt.tv addons, like I did for onDeskToWatch and matcher, this way you should be able to interface easily trakt and fanart.tv.
In my tests on Butter, I used fanart.tv :
Common.getImage = function (id, type) {
var url = 'http://webservice.fanart.tv/v3/';
var cat = type.indexOf('movie') !== -1 ? 'movies/' : 'tv/';
var api = <your-api-key>
return require('got')(url + cat + id + '?api_key=' + api,{json:true}).then(function (res) {
console.log(res.body)
var images = {};
var holder = 'images/posterholder.png';
if (type.indexOf('movie') !== -1) { //movie
images.poster = res.body.movieposter ? res.body.movieposter[0].url : holder;
images.background = res.body.moviebackground ? res.body.moviebackground[0].url : res.body.hdmovieclearart ? res.body.hdmovieclearart[0].url : holder;
} else { // show
images.poster = res.body.tvposter ? res.body.tvposter[0].url : holder;
images.background = res.body.showbackground ? res.body.showbackground[0].url : res.body.clearart ? res.body.clearart[0].url : holder;
}
return images;
}).catch(function(err) {
console.error(err);
return {
clearart: null,
poster: 'images/posterholder.png',
background: null
};
});
};
but it often answers badly (timeout or such), so I would recommend fallbacks to omdb and/or tvdb
from popcorn-api.
Alright thanks for the answer @vankasteelj.
from popcorn-api.
Got a fanart.tv-api
module so now it's time to implement.
from popcorn-api.
Fixed with: 85d4666
from popcorn-api.
Related Issues (20)
- api docs are out of date HOT 2
- why is the default size for fanart/poster w500? HOT 2
- API for movies and Anime HOT 1
- add rotten tomatoes as metadata
- no seeds
- [Bug] Episodes Are Missing HOT 2
- [Feature Request] In App Torrent Search Using Jackett API HOT 1
- [Bug] Can't Always Find Films Or Series HOT 2
- Messiah series missing
- Enhancement (language filter for audio and subtitles)
- Are api down? HOT 1
- Missing covers HOT 4
- Wrong episodes in doctor who series
- Movies and series won't load
- Feature request: Advanced Filter Options
- search does not work with incomplete words HOT 1
- feature request: MPA rating
- Movie scraping doesn't seem to be working, or DB not updating HOT 12
- encanto looks horrid,
- Support for Music
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 popcorn-api.