smfontes / xbmc-mylibrary

Automatically exported from code.google.com/p/xbmc-mylibrary
0 stars 0 forks source link

TVDB.com Offline Null Pointer Exception #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When TVDB.com is offline like it was tonight, does not fail very gracefully. 
Instead it starts throwing NPE's all over the logs for each attempt to get the 
season. Because it continues to fail to connect, each call to the TVDB API 
blocks until the HTTP timeout (around 3 seconds I think). This is painfully 
slow to experience.

See the logs here:
http://pastebin.com/Whsn3WeD

Recommendation:
Check for TVDB.com being online. If it does not provide an adequate response 
during the initial setup then take an action there. The action should be 
configurable. Maybe to fail to an alternative service or to allow it to run 
without the additional info from TVDB.

When the TVDB service goes down in the middle of a script executing the above 
solution would not work. In that scenario we should detect TVDB failure 
patterns and take the same configurable action mid processing when a TVDB 
failure pattern is detected. An example pattern could be more than x failed 
responses within y minutes, where x and y are configurable as well.

Original issue reported on code.google.com by robbiene...@gmail.com on 24 Aug 2012 at 2:09