fanart.tv API v3
#1
Hi, any devs using the fanart.tv API could you please update to the v3 version docs are here: http://docs.fanarttv.apiary.io/

In general if you are just using the standard JSON feed it wont be a big change, the only real difference is that the name is no longer the property which should make it a lot easier to use the data.

For those interested, I set up an SSD server just to test the differences between the 2 APIs using ab settings of ab -k -n 8000 -c 100

So thats 100 concurrent requests running 8000 times which gave the following results:

Old API:
Time taken for tests: 52.556 seconds
Requests per second: 152.22 [#/sec] (mean)
Load: Over 20 and rising while the test was running

New API:
Time taken for tests: 6.260 seconds
Requests per second: 1278.01 [#/sec] (mean)
Load: No appreciable increase

Obviously real world usage is different as thats just hitting a single URL but it's still a useful comparison

Any questions please let me know.
Get and request your ClearLOGOs / ClearART / TV Thumbs / Season Thumbs / Music ClearLOGOs / cdART / Artist Backgrounds / CD Covers from fanart.tv
Reply
#2
https://github.com/RuudBurger/CouchPotat...bea8b12b0e this commit might help you understand the changes that need to be made.

ignore
- image_url = image.get('url')
+ image_url = image.get('url') or image.get('href')

as "href" was a mistake that has been corrected, but as you can see the data is now immediately usable without having to build a construct

name, resource = fanart_data.items()[0]
log.debug('Found images for %s', name)
images = self._parseMovie(resource)

becomes

log.debug('Found images for %s', fanart_data.get('name'))
images = self._parseMovie(fanart_data)
Get and request your ClearLOGOs / ClearART / TV Thumbs / Season Thumbs / Music ClearLOGOs / cdART / Artist Backgrounds / CD Covers from fanart.tv
Reply

Logout Mark Read Team Forum Stats Members Help
fanart.tv API v30