Repository: Flexget/Flexget

Issue:
Minor : webui not showing the correct tvdb series
Some of my series have homonyms and the webui is fetching the series details from an incorrect series.

My series:
- Mom (tvdb_id=266967)
- Continuum (tvdb_id=258171)

The series shown in the webui:
- Mon (2015) (tvdb_id=299884)
- Continuum (Web Series) (tvdb_id=262262)



Discussion:
Hmm can u show a screenshot, not sure i fully understand.

Series mismatch. We need an api endpoint to get multiple series results and select one via ui

@liiight ??? i would of thought the webui would show all the series?

@stevezau, yes all series will show on the webui but right now some series are incorrect due to homonyms.

I'm following the show Continuum (http://thetvdb.com/?id=258171&tab=series) but on the webui I see the show     Continuum (Web Series) (http://thetvdb.com/?tab=series&id=262262). See screen shot

![continuum web series](https://cloud.githubusercontent.com/assets/15908911/14934612/b2b12754-0eb6-11e6-8e21-9e14a6bf94e5.png)

Yes indeed, as suspected, since the lookup API looks up using name right now, and not id, it might return the incorrect one. As @liiight mentioned, an mismatch API endpoint (and UI action) will allow users to set the correct one.


Resolving patch:
diff --git a/flexget/plugins/api/tvdb_lookup.py b/flexget/plugins/api/tvdb_lookup.py
--- a/flexget/plugins/api/tvdb_lookup.py
+++ b/flexget/plugins/api/tvdb_lookup.py
@@ -5,67 +5,91 @@
 from flask_restplus import inputs
 
 from flexget.api import api, APIResource
-from flexget.plugins.api_tvdb import lookup_series, lookup_episode
+from flexget.plugins.api_tvdb import lookup_series, lookup_episode, search_for_series
 
 tvdb_api = api.namespace('tvdb', description='TheTVDB Shows')
 
-default_error_schema = {
-    'type': 'object',
-    'properties': {
-        'status': {'type': 'string'},
-        'message': {'type': 'string'}
+
+class objects_container(object):
+    default_error_schema = {
+        'type': 'object',
+        'properties': {
+            'status': {'type': 'string'},
+            'message': {'type': 'string'}
+        }
     }
-}
-
-default_error_schema = api.schema('default_error_schema', default_error_schema)
-
-tvdb_series_object = {
-    'type': 'object',
-    'properties': {
-        'tvdb_id': {'type': 'integer'},
-        'last_updated': {'type': 'string', 'format': 'date-time'},
-        'expired': {'type': 'boolean'},
-        'name': {'type': 'string'},
-        'rating': {'type': 'number'},
-        'status': {'type': 'string'},
-        'runtime': {'type': 'integer'},
-        'airs_time': {'type': 'string'},
-        'airs_dayofweek': {'type': 'string'},
-        'content_rating': {'type': 'string'},
-        'network': {'type': 'string'},
-        'overview': {'type': 'string'},
-        'imdb_id': {'type': 'string'},
-        'zap2it_id': {'type': 'string'},
-        'banner': {'type': 'string'},
-        'first_aired': {'type': 'string'},
-        'actors': {'type': 'array', 'items': {'type': 'string'}},
-        'posters': {'type': 'array', 'items': {'type': 'string'}},
-        'genres': {'type': 'array', 'items': {'type': 'string'}},
+
+    tvdb_series_object = {
+        'type': 'object',
+        'properties': {
+            'tvdb_id': {'type': 'integer'},
+            'last_updated': {'type': 'string', 'format': 'date-time'},
+            'expired': {'type': 'boolean'},
+            'name': {'type': 'string'},
+            'rating': {'type': 'number'},
+            'status': {'type': 'string'},
+            'runtime': {'type': 'integer'},
+            'airs_time': {'type': 'string'},
+            'airs_dayofweek': {'type': 'string'},
+            'content_rating': {'type': 'string'},
+            'network': {'type': 'string'},
+            'overview': {'type': 'string'},
+            'imdb_id': {'type': 'string'},
+            'zap2it_id': {'type': 'string'},
+            'banner': {'type': 'string'},
+            'first_aired': {'type': 'string'},
+            'actors': {'type': 'array', 'items': {'type': 'string'}},
+            'aliases': {'type': 'array', 'items': {'type': 'string'}},
+            'posters': {'type': 'array', 'items': {'type': 'string'}},
+            'genres': {'type': 'array', 'items': {'type': 'string'}},
+        }
     }
-}
-
-episode_object = {
-    'type': 'object',
-    'properties': {
-        'id': {'type': 'integer'},
-        'expired': {'type': 'boolean'},
-        'last_update': {'type': 'string'},
-        'season_number': {'type': 'integer'},
-        'episode_number': {'type': 'integer'},
-        'absolute_number': {'type': 'integer'},
-        'episode_name': {'type': 'string'},
-        'overview': {'type': 'string'},
-        'director': {'type': 'array', 'items': {'type': 'string'}},
-        'writer': {'type': 'array', 'items': {'type': 'string'}},
-        'rating': {'type': 'number'},
-        'image': {'type': 'string'},
-        'first_aired': {'type': 'string'},
-        'series_id': {'type': 'integer'}
+
+    episode_object = {
+        'type': 'object',
+        'properties': {
+            'id': {'type': 'integer'},
+            'expired': {'type': 'boolean'},
+            'last_update': {'type': 'string'},
+            'season_number': {'type': 'integer'},
+            'episode_number': {'type': 'integer'},
+            'absolute_number': {'type': 'integer'},
+            'episode_name': {'type': 'string'},
+            'overview': {'type': 'string'},
+            'director': {'type': 'array', 'items': {'type': 'string'}},
+            'writer': {'type': 'array', 'items': {'type': 'string'}},
+            'rating': {'type': 'number'},
+            'image': {'type': 'string'},
+            'first_aired': {'type': 'string'},
+            'series_id': {'type': 'integer'}
+        }
     }
-}
 
-tvdb_series_schema = api.schema('tvdb_series_schema', tvdb_series_object)
-tvdb_episode_schema = api.schema('tvdb_episode_schema', episode_object)
+    search_result_object = {
+        'type': 'object',
+        'properties': {
+            'aliases': {'type': 'array', 'items': {'type': 'string'}},
+            'first_aired': {'type': 'string', 'format': 'date-time'},
+            'banner': {'type': 'string'},
+            'network': {'type': 'string'},
+            'series_name': {'type': 'string'},
+            'status': {'type': 'string'},
+            'overview': {'type': 'string'},
+            'tvdb_id': {'type': 'integer'}
+        }
+    }
+    search_results_object = {
+        'type': 'object',
+        'properties': {
+            'search_results': {'type': 'array', 'items': search_result_object}
+        }
+    }
+
+
+default_error_schema = api.schema('default_error_schema', objects_container.default_error_schema)
+tvdb_series_schema = api.schema('tvdb_series_schema', objects_container.tvdb_series_object)
+tvdb_episode_schema = api.schema('tvdb_episode_schema', objects_container.episode_object)
+search_results_schema = api.schema('tvdb_search_results_schema', objects_container.search_results_object)
 
 series_parser = api.parser()
 series_parser.add_argument('include_actors', type=inputs.boolean, help='Include actors in response')
@@ -115,6 +139,11 @@ def get(self, tvdb_id, session=None):
         absolute_number = args.get('absolute_number')
         season_number = args.get('season_number')
         ep_number = args.get('ep_number')
+        if not ((season_number and ep_number) or absolute_number):
+            return {'status': 'error',
+                    'message': 'not enough parameters for lookup. Either season and episode number or absolute number '
+                               'are required.'
+                    }, 500
 
         kwargs = {'tvdb_id': tvdb_id,
                   'session': session}
@@ -132,3 +161,39 @@ def get(self, tvdb_id, session=None):
                     'message': e.args[0]
                     }, 404
         return jsonify(episode.to_dict())
+
+
+search_parser = api.parser()
+search_parser.add_argument('search_name', help='Series Name')
+search_parser.add_argument('imdb_id', help='Series IMDB ID')
+search_parser.add_argument('zap2it_id', help='Series ZAP2IT ID')
+search_parser.add_argument('force_search', type=inputs.boolean,
+                           help='Force online lookup or allow for result to be retrieved from cache')
+
+
+@tvdb_api.route('/search/')
+@api.doc(parser=search_parser)
+class TVDBSeriesSearchAPI(APIResource):
+    @api.response(200, 'Successfully got results', search_results_schema)
+    @api.response(404, 'No results found', default_error_schema)
+    @api.response(400, 'Not enough parameters for lookup', default_error_schema)
+    def get(self, session=None):
+        args = search_parser.parse_args()
+        if not (args.get('search_name') or args.get('imdb_id') or args.get('zap2it_id')):
+            return {'status': 'error',
+                    'message': 'Not enough lookup arguments'
+                    }, 400
+        kwargs = {
+            'search_name': args.get('search_name'),
+            'imdb_id': args.get('imdb_id'),
+            'zap2it_id': args.get('zap2it_id'),
+            'force_search': args.get('force_search'),
+            'session': session
+        }
+        try:
+            search_results = search_for_series(**kwargs)
+        except LookupError as e:
+            return {'status': 'error',
+                    'message': e.args[0]
+                    }, 404
+        return jsonify({'search_results': [a.to_dict() for a in search_results]})
diff --git a/flexget/plugins/api_tvdb.py b/flexget/plugins/api_tvdb.py
--- a/flexget/plugins/api_tvdb.py
+++ b/flexget/plugins/api_tvdb.py
@@ -4,7 +4,7 @@
 import logging
 from datetime import datetime, timedelta
 
-from sqlalchemy import Table, Column, Integer, Float, Unicode, Boolean, DateTime, func
+from sqlalchemy import Table, Column, Integer, Float, Unicode, Boolean, DateTime, or_, and_
 from sqlalchemy.ext.associationproxy import association_proxy
 from sqlalchemy.orm import relation
 from sqlalchemy.schema import ForeignKey
@@ -16,11 +16,13 @@
 from flexget.utils.simple_persistence import SimplePersistence
 
 log = logging.getLogger('api_tvdb')
-Base = db_schema.versioned_base('api_tvdb', 6)
+Base = db_schema.versioned_base('api_tvdb', 7)
 
 # This is a FlexGet API key
 persist = SimplePersistence('api_tvdb')
 
+SEARCH_RESULT_EXPIRATION_DAYS = 3
+
 
 class TVDBRequest(object):
     API_KEY = '4D297D8CFDE0E105'
@@ -88,7 +90,7 @@ def delete(self, endpoint, **params):
 
 @db_schema.upgrade('api_tvdb')
 def upgrade(ver, session):
-    if ver is None or ver <= 5:
+    if ver is None or ver <= 6:
         raise db_schema.UpgradeImpossible
     return ver
 
@@ -215,6 +217,7 @@ def get_posters(self):
 
     def to_dict(self):
         return {
+            'aliases': [a for a in self.aliases],
             'tvdb_id': self.id,
             'last_updated': datetime.fromtimestamp(self.last_updated).strftime('%Y-%m-%d %H:%M:%S'),
             'expired': self.expired,
@@ -333,6 +336,71 @@ def __init__(self, search, series_id=None, series=None):
             self.series = series
 
 
+class TVDBSeriesSearchResult(Base):
+    """
+    This table will hold a single result that results from the /search/series endpoint,
+    which return a series with a minimal set of parameters.
+    """
+    __tablename__ = 'tvdb_series_search_results'
+
+    id = Column(Integer, primary_key=True, autoincrement=False)
+    lookup_term = Column(Unicode)
+
+    name = Column(Unicode)
+    status = Column(Unicode)
+    network = Column(Unicode)
+    overview = Column(Unicode)
+
+    _banner = Column('banner', Unicode)
+
+    _first_aired = Column('first_aired', DateTime)
+    first_aired = text_date_synonym('_first_aired')
+
+    _aliases = Column('aliases', Unicode)
+    aliases = json_synonym('_aliases')
+
+    created_at = Column(DateTime)
+    search_name = Column(Unicode)
+
+    def __init__(self, series, lookup_term=None):
+        self.lookup_term = lookup_term
+        self.id = series['id']
+        self.name = series['seriesName']
+        self.first_aired = series['firstAired']
+        self.network = series['network']
+        self.overview = series['overview']
+        self.status = series['status']
+        self._banner = series['banner']
+        self.aliases = series['aliases']
+        self.created_at = datetime.now()
+
+    @property
+    def banner(self):
+        if self._banner:
+            return TVDBRequest.BANNER_URL + self._banner
+
+    def to_dict(self):
+        return {
+            'aliases': [a for a in self.aliases],
+            'banner': self.banner,
+            'first_aired': self.first_aired,
+            'tvdb_id': self.id,
+            'network': self.network,
+            'overview': self.overview,
+            'series_name': self.name,
+            'status': self.status
+        }
+
+    @property
+    def expired(self):
+        log.debug('checking series %s for expiration', self.original_name)
+        if datetime.now() - self.created_at >= timedelta(days=SEARCH_RESULT_EXPIRATION_DAYS):
+            log.debug('series %s is expires, should refetch', self.original_name)
+            return True
+        log.debug('series %s is not expired', self.original_name)
+        return False
+
+
 def find_series_id(name):
     """Looks up the tvdb id for a series"""
     try:
@@ -377,7 +445,8 @@ def find_series_id(name):
 
 def _update_search_strings(series, session, search=None):
     search_strings = series.search_strings
-    add = [series.name.lower()] + ([a.lower() for a in series.aliases] if series.aliases else []) + [search.lower()] if search else []
+    add = [series.name.lower()] + ([a.lower() for a in series.aliases] if series.aliases else []) + [
+        search.lower()] if search else []
     for name in set(add):
         if name not in search_strings:
             search_result = session.query(TVDBSearchResult).filter(TVDBSearchResult.search == name).first()
@@ -419,7 +488,7 @@ def id_str():
     if not series and name:
         found = session.query(TVDBSearchResult).filter(TVDBSearchResult.search == name.lower()).first()
         if found and found.series:
-                series = found.series
+            series = found.series
     if series:
         # Series found in cache, update if cache has expired.
         if not only_cached:
@@ -539,6 +608,48 @@ def lookup_episode(name=None, season_number=None, episode_number=None, absolute_
         raise LookupError('No results found for %s' % ep_description)
 
 
+@with_session
+def search_for_series(search_name=None, imdb_id=None, zap2it_id=None, force_search=None, session=None):
+    """
+    Search IMDB using a an identifier, return a list of cached search results. One if `search_name`, `imdb_id` or
+    `zap2it_id` is required.
+    :param search_name: Name of search to use
+    :param imdb_id: Search via IMDB ID
+    :param zap2it_id: Search via zap2it ID
+    :param force_search: Should search use cache
+    :param session: Current DB session
+    :return: A List of TVDBSeriesSearchResult objects
+    """
+    if imdb_id:
+        lookup_term = imdb_id
+        lookup_url = 'search/series?imdbId=%s' % imdb_id
+    elif zap2it_id:
+        lookup_term = zap2it_id
+        lookup_url = 'search/series?zap2itId=%s' % zap2it_id
+    elif search_name:
+        lookup_term = search_name
+        lookup_url = 'search/series?name=%s' % search_name
+    else:
+        raise LookupError('not enough parameters for lookup')
+    series_search_results = []
+    if not force_search:
+        log.debug('trying to fetch TVDB search results from DB')
+        series_search_results = session.query(TVDBSeriesSearchResult).filter(
+            TVDBSeriesSearchResult.lookup_term == lookup_term).all()
+
+    if not series_search_results or any(series.expired for series in series_search_results):
+        try:
+            log.debug('trying to fetch TVDB search results from TVDB')
+            fetched_results = TVDBRequest().get(lookup_url)
+        except requests.RequestException as e:
+            raise LookupError('Error searching series from TVDb (%s)' % e)
+        series_search_results = [session.merge(TVDBSeriesSearchResult(series, lookup_term)) for series in
+                                 fetched_results]
+    if series_search_results:
+        return series_search_results
+    raise LookupError('No results found for series lookup')
+
+
 def mark_expired(session):
     """Marks series and episodes that have expired since we cached them"""
     # Only get the expired list every hour
@@ -572,7 +683,8 @@ def chunked(seq):
     # Update our cache to mark the items that have expired
     for chunk in chunked(expired_series):
         series_updated = session.query(TVDBSeries).filter(TVDBSeries.id.in_(chunk)).update({'expired': True}, 'fetch')
-        episodes_updated = session.query(TVDBEpisode).filter(TVDBEpisode.series_id.in_(chunk)).update({'expired': True}, 'fetch')
+        episodes_updated = session.query(TVDBEpisode).filter(TVDBEpisode.series_id.in_(chunk)).update({'expired': True},
+                                                                                                      'fetch')
         log.debug('%s series and %s episodes marked as expired', series_updated, episodes_updated)
 
     persist['last_check'] = new_last_check


Test patch:
diff --git a/tests/cassettes/test_tvdb_lookup_api.TestTVDBEpisodeLookupAPI.test_tvdb_episode_lookup_by_absolute_number b/tests/cassettes/test_tvdb_lookup_api.TestTVDBEpisodeLookupAPI.test_tvdb_episode_lookup_by_absolute_number
new file mode 100644
--- /dev/null
+++ b/tests/cassettes/test_tvdb_lookup_api.TestTVDBEpisodeLookupAPI.test_tvdb_episode_lookup_by_absolute_number
@@ -0,0 +1,151 @@
+interactions:
+- request:
+    body: '{"apikey": "4D297D8CFDE0E105"}'
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Connection: [keep-alive]
+      Content-Length: ['30']
+      Content-Type: [application/json]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: POST
+    uri: https://api.thetvdb.com/login
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAAwTByZKiMAAA0Ht/heXdLmWTzI1FIGyKDQLe2CGEhMVG4tT8+7z392u3279oX5H9
+        n92+Ynabm0V37eyf6ANPfgcXSO5ioUEJ9mPy0GzwXTEbV5bSXdHl6KNgu+re5n/6BQ64h4h292HD
+        1aXEpQYXOACWxWWdxcYRIrr5enr09J7zP4VYB9/1KxYsnn+83BPl6XBN1ab+fVsTj2ezR4+2zPPB
+        wKla+6dEFeYVRBekiEoLhOjgRN6lVFlMKPgNpweUOS9OuuvB4qoKi5JE1JyZksP7S3YCtn6Qz/4U
+        TjOfKzleWaQsYutKaaAXY0ddam+0XeNcO9zgQDzkNKs8JyAtLPxsmN4LIImmYB3JGc9IiJUfwnWj
+        1BUtNOUKgORoN6p6uoW0vYNnHnvux0wYHoyCmsRZLXqu7axZliYMM465PtcTNBi49jQjgre0JwB5
+        cfKeR2N2ETQqp+s5G2vsVorvLAsko0ose2HIOMOzTEPq3GGK5M0h0sYEa5uC8EPc5anI4zt+B/uv
+        f/8BAAD//wMAwoNHq9cBAAA=
+    headers:
+      cf-ray: [2a811de6ee9226fc-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:32:59 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=d63bcecab97d0c58d8b5e2a0dc870e6c61464096779; expires=Wed,
+          24-May-17 13:32:59 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMxNzksImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2Nzc5fQ.ftW4H33VtL1o3omOYBgfuwHq3lrGkjVhdbbmFlYBfN1XB4rv9UEjA5Ah94U-KUMEdByWno9uTqVI82MWXiO-H2eel566nBbyG6K3Nsa19JD-87NqTqr3bAblvyUAs5hL6YQDcpioLoJxohvWbC-PImnMjKgv8rX9YcHlZgyDk49XUqQvpn7lrj4WASn2ip6ichIG8e99X0JgBB1PTohR9ZbWMLzGXylmFcoGnKvHo7fJagssgTTa2yLN2knjmFlfMCFUIPYkn9jMWXwrpFrLjIFeKik2JlCyPd5waaQ6FeXHJsyjF7I78oToKRIYj8xKn6xy4HxqQTznLsZA8pwWwQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/279121
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA2RUy47bRhC871cUeEkCSAz18OpxW8tZYIE4Nrzr+GDn0CKbZEfDGWGmKVoxDOQf
+        8of5EmNIcXedHKf6VdU93V+ugKQgpWSLL1cAkEiRbDFfbWbz2WRAAnvh8Bs1nGyRPNSMW0Ohxo/z
+        bLb8Kbl4kREKHJItPv5xgfZkLfsYVHk61pKT+XnIPK1W6Z/HKvmuwl2snMw2i808e7QoaRuTJjtn
+        VWwr9jGqFB/0Rjz3cZHMdJZNs9Vot6yd84eR9O7DfwxDvRH0rVUZJC5fjGDF1kfoY/8EkptcxdmL
+        Ob6LE1ttPT9Brzw19PS8z4VtztNbGUJ7fOyQO7E/CXex6k2p7EE4klfJDYPynA17UueRUxs4gFB6
+        pgOCOt9MsLu/w509cVCpereX5P0ZN8awhQQE9W1+wP4MI1WtVmwFsgVKMiZArDoQctdQitfOah1g
+        KJKoGdTRgW1AJ1pDa8bRdezhSoT2yB7hyFxMUHmKY6lQS9O70V6M6Bnq0LgTQ2vv2qrGjq16MthF
+        o5EDgyxaG5gtqpZ8IWRBtmKT4qHuQ8SKChlzBn/ORbmIQmoJsNyVrrXFwClMLrKj4NrlBy5i9UJC
+        HtsbxcQYpz0/Z80Zn5KGlaZ125D9lKCrHToKyD1TLCO2d40diIJ7Wc9mwZ+PxgVxFv/+/U/fz5ic
+        T+zPzvbF2hBbojWLj2QvPFE6j8q5Ir0QjpO20dA3+T59SG/Sdyl+pX3o0xZcSE7KoVdtpOQo7Oid
+        cj6oEWtdzlZT3DoP67rJIJBQcofcuMAovbAthowUgsulT3mwroPWpE/dM6Ls+4bH3CUF5aBo4mCM
+        nHiCfasQRefsD4o9wzhbYc+l8zx0zHlTwDD5+HOecg8fsqaAPeeu4TSNQ77ckXRcNkNB3x+LOIJk
+        i9nyepkt1uvVejww4sMrOr8pPzAPS91yKOicPLM/XDZ4vc0yvH39uNsU/2gf8/t0thxhaYr9cARU
+        F7NsNV+vR9NfdJyLDsZf3mazzXy+WVw/liqKZ0cnW0yzObLZdrnYvlh95/PynGyxzK4Xi/l40ET5
+        3UhnnV7/D9651mrUv9pcAV+vvn4DAAD//wMAK5TeUaQFAAA=
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811ded589c1583-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:00 GMT']
+      last-modified: ['Mon, 23 May 2016 21:27:58 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=db13a911b2e7d2e0d84bbcbce3305e4521464096780; expires=Wed,
+          24-May-17 13:33:00 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMxNzksImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2Nzc5fQ.ftW4H33VtL1o3omOYBgfuwHq3lrGkjVhdbbmFlYBfN1XB4rv9UEjA5Ah94U-KUMEdByWno9uTqVI82MWXiO-H2eel566nBbyG6K3Nsa19JD-87NqTqr3bAblvyUAs5hL6YQDcpioLoJxohvWbC-PImnMjKgv8rX9YcHlZgyDk49XUqQvpn7lrj4WASn2ip6ichIG8e99X0JgBB1PTohR9ZbWMLzGXylmFcoGnKvHo7fJagssgTTa2yLN2knjmFlfMCFUIPYkn9jMWXwrpFrLjIFeKik2JlCyPd5waaQ6FeXHJsyjF7I78oToKRIYj8xKn6xy4HxqQTznLsZA8pwWwQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/279121/episodes/query?absoluteNumber=46
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA3yQQUvDQBCF7/kVj7l4aaWNabS5KQoK4kE9KT1MzSQubnfD7iZVSv67pA2JheJx
+        3vf222F2EUBamS9PGXYRAFChnA+UYT45zJqPRiPf3WhqrfukctL0SQS0XUo5B6YM7/vGQQwQr73V
+        dZCnerMWRxmSdDIw5SS/q5S3+cjji2P+Iuyt6cCp/OGWMqRxukyTAefNf9K8OaWU/gFvhDLQ66fg
+        mT8EtsC98nhUhdBQ3p/rului68azeTqdLaZxMjZURxaL5VV6Oe6l2ZQ1lzLc/dTPYgYLQLYR1yjZ
+        9qQH7aD8y2/YuR80dusRLHywFd6s3YCLIA5a2Bllyn125hFcLag0G39+0LYRsIraXwAAAP//AwC8
+        bPjqHwIAAA==
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811df458390f87-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:02 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=db3d149f2bb9fcb28b9eced10e20272ac1464096781; expires=Wed,
+          24-May-17 13:33:01 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMxNzksImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2Nzc5fQ.ftW4H33VtL1o3omOYBgfuwHq3lrGkjVhdbbmFlYBfN1XB4rv9UEjA5Ah94U-KUMEdByWno9uTqVI82MWXiO-H2eel566nBbyG6K3Nsa19JD-87NqTqr3bAblvyUAs5hL6YQDcpioLoJxohvWbC-PImnMjKgv8rX9YcHlZgyDk49XUqQvpn7lrj4WASn2ip6ichIG8e99X0JgBB1PTohR9ZbWMLzGXylmFcoGnKvHo7fJagssgTTa2yLN2knjmFlfMCFUIPYkn9jMWXwrpFrLjIFeKik2JlCyPd5waaQ6FeXHJsyjF7I78oToKRIYj8xKn6xy4HxqQTznLsZA8pwWwQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/episodes/5598674
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA3xSy27bMBC8+ysWvPTSJHrb1s12CjhAkUOcoECLHmhzJbGQSIFcyTAC/3tBWZIt
+        GO11Znb2NZ8zACY4cZbC5wwAgEnBUojj5SKZR18vEJcGxQ651YqlENyjL88shSRIlsmk5FstrRb4
+        2lR7NK4y7FnsCV4hS4G9Fwhv/ICgM9hKC99lhqyXZtJYWjk3pww8P3nw4ocgGvi8QUs74sayFH51
+        GAB7RyFOsEMHd9jvXi6kwQNpNw1bKdJKanjF3CANhkcjCaduK260gi2We6nyXueaaCFGdNJFt2ha
+        iUfXZc2NOUGrjxZIgyVdw0+tK+AZoYESuVFS5R32xQKZBqEuubKPw0AlV3nDcxxfdH9AVNepbnuj
+        usx17q1qo0VzIKnVRouucmhiC338MOUtVHJLH7Xg1J3ej5Iw8aJwOfxQtOJZ2kMXl7FGtPc5Ee2/
+        gyBasSl4TR2qmrIc4rO3umzoWhElYx5KVMPaF1v7FMyXfuA/9al9/FPn415oJNoXN+RFdL/c+sRS
+        CJdJFMyv4bUr955xl9vRpLFrzLTB/7P9zlOaiqbarxoqugRGoefH8wklxDTo/gL8MI3i1E/YrfCH
+        FFQ4YeR5E2KLMi+oswjigZGV2Hc3YERx4MfzeDEeSBK+cXIRTsG7Aze6Uc7NmwGcZ+e/AAAA//8D
+        AGcqyAEwBAAA
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811dfacd73236c-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:03 GMT']
+      last-modified: ['Wed, 18 May 2016 20:46:33 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=db0255d41ffd72112c548891b602251ae1464096782; expires=Wed,
+          24-May-17 13:33:02 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+version: 1
diff --git a/tests/cassettes/test_tvdb_lookup_api.TestTVDBEpisodeLookupAPI.test_tvdb_episode_lookup_season_and_ep_number b/tests/cassettes/test_tvdb_lookup_api.TestTVDBEpisodeLookupAPI.test_tvdb_episode_lookup_season_and_ep_number
new file mode 100644
--- /dev/null
+++ b/tests/cassettes/test_tvdb_lookup_api.TestTVDBEpisodeLookupAPI.test_tvdb_episode_lookup_season_and_ep_number
@@ -0,0 +1,152 @@
+interactions:
+- request:
+    body: '{"apikey": "4D297D8CFDE0E105"}'
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Connection: [keep-alive]
+      Content-Length: ['30']
+      Content-Type: [application/json]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: POST
+    uri: https://api.thetvdb.com/login
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAAwTByZKiMAAA0Ht/heXdrsRuoZmbAoGgCKgs9oWCAJKwBGQxODX/Pu/9/Vit1iOv
+        8nb9Z7XOF6tMDUIdal39N4ZnigfcXnZExRKuuihQLeUzX6w6N/fUYTo4M084mi1s5g+4qSvMOL00
+        os71rM5UPOBGWZIwK5IQAcy4OGt3YGvV9vzGsPA+r1fvu0lOm+76K5EIdOXNyFx6gJAYgdFRAp1k
+        cZJHg0TF8CaFLhG1zuXhV9BjH/nTOBe6VStjbzjXqdrIylZOzcskWS32phd4Hl6l5u90rfyJQRuN
+        EUBLiVQ7Ng8oiEP76CRnK5p7J+VUuDeg+Omi8ENf7v3j6wQnpe7e5smdwQMGzXQsvooT0luQSqMI
+        oXIz7lo/wC/J3h4vwxO9rMAwk0ibfFlvLuGoTLRYbo2BqL3khg3YzOZUEkEMha+GpBukezoZWqM7
+        DlfvbHrmCzx4TdHyl00eY5Z1y2O8y4iKWAaSzx47t9pF49bjoQZ5jFpTVRkiHeNv8h4KcsrnOO59
+        sl9//PsPAAD//wMABpY6QtcBAAA=
+    headers:
+      cf-ray: [2a811c921dc5269c-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:32:05 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=da3f9963fd0a4af2d39ff8628df12c2f11464096724; expires=Wed,
+          24-May-17 13:32:04 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMxMjUsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2NzI1fQ.SSQ4maL-pSZ6cX0phTGdPiB11cGVGpic1OayOagmFxkjI-b1PcxlEo7sZxiKqXUutvfEJl9tqGOSuk-7927bHRu6JnIQuw0rBwhDU5EDh8_0nXtX0FyhFCM_HBFV_WMKOaNJXvqOboixPT09Uby9oBqhAUKwL1u9lpzHLPv0g1VmuKf3fLFEn0b6txW19TGYDqs136M2KRsrFwJVGHaXDuU7EmRWt9uifyTmGFiMyeGM0jvjvb6xV_1xUCWcps6YbuGDmEOOoCYjurey1BQmfnowMcgtddpygtY7Fix_706Ujg5Pk5Xt2QoWD1o_FnHCCjFcpjozczsfcLev__qUcA]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/77398
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA1RU0W7bOBB8z1cM9HI9wE6lOHFiv7VJDfQAX4umvStwuIc1tZb2Si0FkkqqFv33
+        gpJp9N6E2d2Z4XKo7xdAUVOkYovvFwBQSF1scXu72twtZiCwFw5/UsfFFsXHlvF5uRPLoTg1kBUK
+        HIot/pkmcOrCr10ZnEfx4qqs1r+fGHJt7p84/j1xH0iVfRJuPPWtGLIv19Wyufyvb7L+bPBt8l2s
+        qzMaKQ7JVHHvNIoOoueJo/gQX4nnaababFbLcrOsyjyrHJ+d/5KGd+8+48Wnx2y1OJVmtdzvB40y
+        7+f6JoMNq08rOy9lP4bIfjzVgeLRCKvh5U5MFKfF/07untg/CT8nE78sHUdnhsA1nCK2DP7aWycx
+        wB2xe/0WrxrWGLBzX7EfbM1+gQdSwqMZrB0X+MO1igfXNBwjSGvsnYohfOCRwwTElsVD9IlDlIaS
+        swDR6Ca9njyp8x3ZS+y869CwchSDboiUlBPnF7GWE0dgEwOiA6Gx7kAWxmnoxZMZ06dhr6LNxGyc
+        dSrfJsF0mjfkY4vDCFKQFVaEno1wWCC2EtCJ1suDaxor2izQDp3zbpgNOGMoiFOydsTRS9NGnoTm
+        rMB4psh1Yr9vvQTck4/s0VLAgVnhlJOHtOFn5239W0DnQkTv+sGSRzCyPMrL2lNHCK17DgiihpGu
+        oh26g2UcuBFNqml9SCm7zNmwFOKnvk4eii2q6/V1ubpdrzb5RYkPDzS+O/7NPKVw77SmnJyCxIeP
+        p7zdbcsS7/eZ2FNMOU+Z+WtZXWdYuvowRzbGsirX1e0ml75RfyVxLr55X5blXbm5OYeY6np+JLl9
+        Al6PxRY6WJt/ERL5Q1bOhwhn8N4NGostrm5WF8CPix8/AQAA//8DAP3f6zR3BAAA
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811c9897e108a5-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:32:06 GMT']
+      last-modified: ['Mon, 23 May 2016 21:07:19 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=daf2af21d068ba82947dffafef5b6972c1464096725; expires=Wed,
+          24-May-17 13:32:05 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMxMjUsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2NzI1fQ.SSQ4maL-pSZ6cX0phTGdPiB11cGVGpic1OayOagmFxkjI-b1PcxlEo7sZxiKqXUutvfEJl9tqGOSuk-7927bHRu6JnIQuw0rBwhDU5EDh8_0nXtX0FyhFCM_HBFV_WMKOaNJXvqOboixPT09Uby9oBqhAUKwL1u9lpzHLPv0g1VmuKf3fLFEn0b6txW19TGYDqs136M2KRsrFwJVGHaXDuU7EmRWt9uifyTmGFiMyeGM0jvjvb6xV_1xUCWcps6YbuGDmEOOoCYjurey1BQmfnowMcgtddpygtY7Fix_706Ujg5Pk5Xt2QoWD1o_FnHCCjFcpjozczsfcLev__qUcA]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/77398/episodes/query?airedEpisode=6&airedSeason=10
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA2yQvW7bQBCEez3F4GpZsCjZQNQZSAoVSgq5C1IsdUvyoOUdcT9UCENAXiOvlycJ
+        TmJoC1E5O7PfDvZtBigx9hjUBm8zAFCV8SGqDZbzqxa6kZZ/ZmmTyDjpPPfjZAac81RpiqQ2+H5J
+        XMGAojI4SZG/prZkf0PJrvGsv3QmOP2eeL6190zB2Vzn8Z6x/ZxXiuLTej3Zuv8PenNW93epPO5Q
+        y2oDtRuwjz7VtTC2WzXFLt96yQ1yqnhcPj88Fg9F8Z4w2XlaLVer9dM0FLJ1opqnt9+7yXaiAMr1
+        7HvDp9EZjfOE/Oi/Ngxjew7R1BSNswGxoYhdEs0eZDX2hyQyoOSaLE4mNngljW9/fv3ekQgPaKhn
+        0ImObFmjcyf2VRKw5dZwWOAFHVlzyARjAyigY9cJg0SQyyA2jINLNvoBIWnNVgaESD6iIhFjaxiR
+        +cc64twxoHIehEPyvPhX+eBs5Z2N4UJtc+fGtWgYJYvhngOiQ5llY6yGibnHHGWKIOtiwx6VqZNn
+        VN61mWI8OgoRLQ3ovOt5JOQDRx4W1xefZ8CP2fkvAAAA//8DAPFoJ1sqAwAA
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811c9f3fae15bf-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:32:07 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=d7a31b78843edb02627ac6b994d610b091464096726; expires=Wed,
+          24-May-17 13:32:06 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMxMjUsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2NzI1fQ.SSQ4maL-pSZ6cX0phTGdPiB11cGVGpic1OayOagmFxkjI-b1PcxlEo7sZxiKqXUutvfEJl9tqGOSuk-7927bHRu6JnIQuw0rBwhDU5EDh8_0nXtX0FyhFCM_HBFV_WMKOaNJXvqOboixPT09Uby9oBqhAUKwL1u9lpzHLPv0g1VmuKf3fLFEn0b6txW19TGYDqs136M2KRsrFwJVGHaXDuU7EmRWt9uifyTmGFiMyeGM0jvjvb6xV_1xUCWcps6YbuGDmEOOoCYjurey1BQmfnowMcgtddpygtY7Fix_706Ujg5Pk5Xt2QoWD1o_FnHCCjFcpjozczsfcLev__qUcA]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/episodes/5313345
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA3xTy27bMBC8+ysWOieOrIcd6+Y4BeICboE6QVAUPVDiSmJDkQK5lGEEAfob/b1+
+        SUFFduw46JE7s8PZ1/MIIOCMWJDB8wgAIBA8yCCNJ3GcpBevISYM8g0yq1WQwSQ8D69ugwymUTRP
+        kmPwUyus5vjFNTkazxhAHOKswSCDYL2DDRlXVRJhtQoGUimMpYWX8ZwonEwvw+gyivZ45dDShpix
+        QQY/+hhA8FmjhHVxxyQGfeznQOfCYEHa2wiWtREWlswQmr3c1gjCU60T2omY7tB0Arde7L5GEKpD
+        S6JiJLSyQDUjWDvJ0QBTHDaFk3IHOVZMwVZQDfeMw9e/v/+smZS4g5p1CGzLnlAhh1Zv0ZROAips
+        BNoxLKBlShReQSgLzEKLupUITErwZoBqhEI7RWYH1nGOSu7AEjMEJZNSqAqElBfHdqTWTxZKbYBB
+        4QyO95YLrUqjFdletfGea91AjZCjFNihBdKQ+2ctFAdB3scF5I6AKU01GihF5QxCaXTjVYSBllmC
+        hu2gNbrDQcF/8IS78X4KkqnKsQoP+3i+LagG8rs5oHqd0csg1RrNXeEHstS8z5wsvj+G0/1Xttbb
+        ByM98Pa7pYeWM+p3bpKk03QWT9Pr/Qp1/FbYor+QQw7vPjgN3p3tvnJSvqHLmrX0Ps5yq6WjD3NK
+        IVHtO/Aqba9ms3h+fTUc6/hXWx1qQyPQrrzRnnNe380uyCCeT5No9naxdlESmkM5x9aEsTdYaoP/
+        R4eqT2GqXZMvHNX99cXTMAqjE4jzd0c+gck8i6Isvg6OiY+CU+2JSRieAHcoqpp6iSjdI6Lhed+C
+        gChJk/k8TQ79EYTfGAlV+Q6N47Pw0p+Sn+hsBPAyevkHAAD//wMAb8pUVSkFAAA=
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811ca364212720-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:32:08 GMT']
+      last-modified: ['Sat, 27 Feb 2016 11:47:38 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=d7aed3d4f018c2a1fc2f5d5be0d98d7bd1464096727; expires=Wed,
+          24-May-17 13:32:07 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+version: 1
diff --git a/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_imdb_id b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_imdb_id
new file mode 100644
--- /dev/null
+++ b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_imdb_id
@@ -0,0 +1,71 @@
+interactions:
+- request:
+    body: '{"apikey": "4D297D8CFDE0E105"}'
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Connection: [keep-alive]
+      Content-Length: ['30']
+      Content-Type: [application/json]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: POST
+    uri: https://api.thetvdb.com/login
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAAwTBy5KiMAAAwPt8heWdKcIIyt4UEBJN8AkDFwshQIAAQlTi1v77dv/9ms3moqtp
+        O/8zm1OJyrubMp+h8/UDAWFwhO1JTy1owLr/DSxkflOJGuqtmV85KqmOk29jiS/OCHlTw6pjJz41
+        1MmazIIj5KZMwixPwq0Kq24idqRiu9Z825ny4/f1/fGSph+dd/nyndpPWdsH505zJdMyBBL9FZ7T
+        Rn1YS3XZbvSaUFcFnsdZjpv3xiWdXIE3J6G27m95oC4Osn2YhSkPA9c+uFwwLGwWp50fyFwA/emx
+        to9Ouzx2JuU2DpRqneEKvPNzWnXCyMKXV7hm4R/oz51uRehqysEDuTKUqtzqlEMag8kxFlsr1U5L
+        0u3W+rN5XFOA2khfVwHSLWpJgZLPz8WEPipYe03iJV4FnMetumKXYalFQlP3+TqdXgaJLAFUNijY
+        1kU/7YWy4Yfn5bchVrlL0DCO+wzXxLDwCG61a5gVJ6ch9sB1KGvFMFrb7ZhZ3KNgn/CC3CaxRe5x
+        /vXvPwAAAP//AwBFNXeS1wEAAA==
+    headers:
+      cf-ray: [2a811eaea9260893-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:31 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=dd6d590063a52863185fef5c2ec6f5a6e1464096811; expires=Wed,
+          24-May-17 13:33:31 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMyMTEsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2ODExfQ.UwzHalpsEwhvOEkOcinpVSo2Gyi2dJ1a5vWScl0qC707nB5kNeG01HHmifMlwBGNoy81wmNW2Ap_fV04Pynq9g9yPrm2zMh4iMtDiZcoOVyft15uHinpYRKfZEx-_sree2o6GtMKOfejot6dWvHgG9gOPe3beFtWG2-PH1f-rh0yF5emIeZ1xE64FCc2R7NoKA5ulqUc1JnY5AjVJ5CeCytJaz3T9IOJginUaZ7M8VmmZn08iTr72Yt20LfAcxv6NYCt10ir-MD5tpxLt-BmPuTXlNChKaJrssLdMkN6CMs1_kG69jmNRrZH1Urhk-66nDGoi9gbYVLamgN_xtFJGQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/search/series?imdbId=tt0944947
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA1SSMW/bQAyFd/+KBy1dbDdKixbN5gZoO6VDC2QoMtASpWNy4gUkbcEI8t+LU9C4
+        WW5473sEH3FPK6DpKai5wp8VADwtL9BQFnL2atyt/4l7UmVrrtCMRo9JOsrv28v2w6d2M7ZftveP
+        Y/PKDmIeOzHuK3950babi4+b9vOZkOq8xF815ZiLPdTIj68/z2w5sh2F52r84iMrtOwzY6BJsrBj
+        kDEFhmLoioaVjDIgEmM6xbIoMmlfxVv2YCu+xTeTLqQo9hwzsy58KgdnR2bqHVEwHHLeeEeZMZNt
+        scsZc5LMIBzZTiDthDXAR8mgmR5YHfIybCCLxB7QYpG22E3SeyzWTLYGQXnM3AX3qEWC7IRiPVvd
+        dBIfJHy98De14DvHLUWX1hAH5YxIFPAg7f1NC2PKky9DWFGbV1W6E1IxK1bpU9F+ez6xswn7DU1c
+        j/ydJq7x38mKsv+HBcWh/ovmumiIHkTHZjGfV8Dd6vkvAAAA//8DAHag5qZVAgAA
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811eb58a7c27b0-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:33 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=d2ea4ccc35323a0de7a1ddead958f82151464096812; expires=Wed,
+          24-May-17 13:33:32 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+version: 1
diff --git a/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_name b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_name
new file mode 100644
--- /dev/null
+++ b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_name
@@ -0,0 +1,106 @@
+interactions:
+- request:
+    body: '{"apikey": "4D297D8CFDE0E105"}'
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Connection: [keep-alive]
+      Content-Length: ['30']
+      Content-Type: [application/json]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: POST
+    uri: https://api.thetvdb.com/login
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAAwTB25ZrMAAA0Pf5iq6+zyzVC87buJQoWplR4mWWRFQQlwktzjr/fvb++7bZbMeu
+        pu32z2ZLF7fENmFX5n5FK9gFDAjQwiMxwAnUfXI3XO2DLm5DnU92rSwpqML5avrz9ZsIwJsaVB2D
+        fG6olTe5AQTg2pLFeZHFZwlU3RyYSPLNWg7Wel+EH792Hve2lSDnzJfkfurqRuD9ODK93NdxWGj4
+        4cyaL3lQkVrcA7U53poo5r1JEpLbXgCHSf9y+YWWQituo6T+toepBBZak/UdsizkJXvq8ZJiHy8E
+        68mnPS0pUjJfktNhNwvvbglqHE7AjeoQcz27wAI1Zn44Df7oa4Qb5OxAXpdmG9NE9Y5EUztup9fM
+        4cp6EPSUDINayJXxQxTVeuEclj71LHlK6YQgjIzUeMojY4K27uLcGEJhj4tOZi+mm46hhUpQTHX2
+        FG7eq95ceW50JIhEnjQ9kJK/Lu+kaFRtv0NcVcSw+7FMOa+7BFf0ZY5xZilkGJ7r7VF9Q7M5epb3
+        2L79+w8AAP//AwD+uUno1wEAAA==
+    headers:
+      cf-ray: [2a811e52872808bd-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:17 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=dd23648fa9ace26efda904e40ee1cf50c1464096796; expires=Wed,
+          24-May-17 13:33:16 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMxOTcsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2Nzk3fQ.rGdWpGEXYHFmyXV6oklsb3ttiBh3kWQf9bgHx9M0LR70nbpI8l5PlUWmpDcXcdGLNRquBSJmKehs9fPt08rn4uhIEYzXz-RiaQmhivBWyZbMbycbBXAGuyZY7aM02Zq1xsLVEseC46IJUkQbmBaKRfYlDd46qMtM9cmCcFHRmkhDnWeX8L5c98omGZOaHm7z4se6Xqq8f2jC_c78EwbdRhMeLE2uZeuYRRUCZCv2tiisenJyHPiYYQpbfo2iwiBDHC9Q7NfukavsJdp8LxjLJU5cYcUL0ugY7dwK-cfl8931Ym87sq1_ED2dkoXbjewDtWaE7cqqvzPgjTRDl5LELg]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/search/series?name=supernatural
+  response:
+    body:
+      string: !!binary |
+        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
+        7DW8+wjiEcBfj/7+BwAA//8DAIWVe2KzFwAA
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811e5a503e0f87-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:18 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=daaf80c81d8341e896c83764c5f8e30391464096797; expires=Wed,
+          24-May-17 13:33:17 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+version: 1
diff --git a/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_zap2it_id b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_zap2it_id
new file mode 100644
--- /dev/null
+++ b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSearchLookupAPI.test_tvdb_search_results_by_zap2it_id
@@ -0,0 +1,75 @@
+interactions:
+- request:
+    body: '{"apikey": "4D297D8CFDE0E105"}'
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Connection: [keep-alive]
+      Content-Length: ['30']
+      Content-Type: [application/json]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: POST
+    uri: https://api.thetvdb.com/login
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAAwTByZKiMAAA0Ht/heWdLpRFmBsa0KAkoEATLxaBsC8uQBOm5t/nvb9fq9V66GvW
+        rf+s1ozbBT0mJS7tW7DADSrhB3ZXJTlAFdbPKDzY+jfjdsNORokrU0SVN2PgcKfKP7Btalj15bWd
+        G2amTXqAH9jqPP5Js/jHEmHVzwgQ0QH1FgMoZ963abunPHxYeWLtftt8wj1rYwtK0ui62RK/Jj7t
+        5ppc1cCLjkgVIw9LO4IFVR7ILSH5nvlGON4rvqFesuteRnm6DNqC0A7zmCJSDkQMhwqB+50bXJ8e
+        V7UrnlZ2MFNJE10/1ieFpos8lljrBsLQs3g/w1w58ky0Ix3C8tXtP4qTHy0N+Bkl6TTMgW/SF6Ag
+        dQewAQym4+C/LZBI4eGhPc/3Kcsfr4lrl+Aq4hgmtryEDPYjvEmllpjofSHOzN3gRAGTrc0Zd4j4
+        BZxcTNu+3ibUZ2j0fEU4k+bX0JaxKLYVll2KOgH7l9nZP46ip2V2byo3QYlEgSeVpc9Bs1fBkI7e
+        +uvffwAAAP//AwDO+RFy1wEAAA==
+    headers:
+      cf-ray: [2a811f1677762342-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:48 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=dcb14275668951f0737c6d4ae3110a6a41464096827; expires=Wed,
+          24-May-17 13:33:47 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMyMjgsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2ODI4fQ.EJPHgV_FgcF7wmgvOoemaFI33uPPfzaqvyv7xkYR6UQXGN60XQO37YO-64tYScYgBeTAVuZjy1bQc7nqAiHLt8zNN7OyabNYitY0VtjNDZZyAy9v_R6nhpFfCEd380PTa9v5bdz4uiO8ntYeNphrpVg5Gyf0JX9IIiqnBs5MgGF8DTfbYdvtxUTEbqDbDdPtD1DeIdutTrFDc3VC_8pKZvfg_qvy8LUR0OaIcJ4zVeIouIS3i8cENrLYMxyPUHbDe4F1KOnNYThIvPObmok2cbTeNuQT5-KYlwA8zuhh2jO4PbNn-OTLxMB_G0Q8fJoE5S-5X0-ycjF9xUlB6DtduQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/search/series?zap2itId=EP01922936
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA0xTQW4UQQy85xWluQDSZkgipAhuYSUkJOAAkThADt4ez7TZHnvV7dlhhZD4Az/k
+        Jahnk2wufWiXy66y/esMaDpyat7g2xkA/FpeoKEkVLjUwN3q4XNDqpybN2iGTLsogdLLq+vXl1eX
+        58N1+2M3NI/QXnLxG8ncVfjVxeWr88uL84vrE0Jq5Jj9+Kfss+VtTbmNjPXXE9z2nPfCc43d9M4Z
+        hB1ll5AYFAInzuSWEWgqXEDoM9MWxS2PK6y/vMd73XNxGRbYW8r5gJuUWCEFxfMUttgckGSIrqID
+        SDv0lFKBqBsIwUZq8dHUY0Gi2kRk0Exb1oJZPMIjY2czZ1iPMu04o+yYuxWGTOqVNsq4wGgjSfwA
+        N4y2Z3jMNg0Ra1bPlLCuwSRbBikmLcyKYaLcCSlIB04tbuOSIioulNIB/DOIc1eFRClQnnubtDv2
+        VFb3sqvgaGHLXa3eSQnV3iqm5pgv/ZmmA743Izudx2kk/d5gjoaZCkJmqmVEF2h1oApeZD2ZBf/c
+        JStiin9//i5+VnLecz6YLsWmUi3xyJJrs/d9oreMwaxr7xuuk9YaWEz+0t62N+3nFh9oUxbajjsJ
+        5FwW1Ul6rsJ22ZzDUY2oWmD1Fu8sQ21eHQUSep4RkhVGn4W1OzJSKRZkodyqzfBIfnIviXNeDK/c
+        PRXn4hjrYJLseYXN5BDHbPrMsWEk0wEb7i3z0THLqUNiynVzTtzHhYxUsOFgI7dtHTLjXaIS29M5
+        FM7C5RON/HAsCwLP66m9eIJz8qmecbO2un6T6NAswd9nwN3Z7/8AAAD//wMAn4D4ywQEAAA=
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811f1df9f70f87-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:33:49 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=d7bf8de5ce1bd859dc9a5faf7bbb4f5f11464096829; expires=Wed,
+          24-May-17 13:33:49 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+version: 1
diff --git a/tests/cassettes/test_tvdb_lookup_api.TestTVDBSeriesLookupAPI.test_tvdb_series_lookup b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSeriesLookupAPI.test_tvdb_series_lookup
new file mode 100644
--- /dev/null
+++ b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSeriesLookupAPI.test_tvdb_series_lookup
@@ -0,0 +1,165 @@
+interactions:
+- request:
+    body: '{"apikey": "4D297D8CFDE0E105"}'
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Connection: [keep-alive]
+      Content-Length: ['30']
+      Content-Type: [application/json]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: POST
+    uri: https://api.thetvdb.com/login
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAAwTBR3KjQAAAwLtfodJdLgQGId/IzACDyOFCEU0YQAJkwtb+3d3/Pk6n8zJ25XD+
+        Pp3LHdaZkjdmAx3vAFfUgBkMNp0LgAHdM/QFeP8sd4hLlWvMViJQa22maKzokGbQ4w60Y2P3Gy6l
+        AhcCmEF/39OgqNJAJkA7bkiMCEPsSNTmW2V9VsaxspI5+5P+roXVSxeD58MpEA/PtBJa74aDod25
+        7wQjUqEAdY6Dd3YT5xL/Bta+mxnVJQ5JHlE8lJfszVSKI33VwqjIjPPjj1yioCXUOBONTdrupnfl
+        F5nCtqbvcJRb6aZ6cW6LZUbpyUtbnn73YLiacFvJunCNSHWkNVTDVrCyqmwApNfKue+t2wMHEBOt
+        WuRi9KhfXuEM5OSmpVUkpSkseLtrg7QkCDvkIxPk9VqMF89B776JQtMWp3hC+Eh2HgtVtlwYnD1+
+        c7vq5aOQ1nV4eNmK0oTAsjdgm+vvmg3jp2i4ELqZGOcecfOnlZVQzOZUbb0cKqMYff/ybuSLo+F6
+        /vj/BwAA//8DACIxPUfXAQAA
+    headers:
+      cf-ray: [2a811b4078822366-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:11 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=decdc7c724c01f71313e764ab2b63d6591464096670; expires=Wed,
+          24-May-17 13:31:10 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMwNzEsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2NjcxfQ.fMzw8EOsVrLuhCwUatMBBXrWDzUOQ_5Lknz65TsmkCMYHJCJLAAJ98xDselvWQyyOb3k_S22zYZne-bu6fGSE4hCoGF6SgVoA_GNtXKAONoiajyOU1BtF3lRKLyJoFjE7HUZcRDeb3L_qKtpVkP6Ah0TjEQ-AiD3k2Qnfnxd8FHGxIIa1fS9yjTmISI0r5HQ2tMmNmtqXsIF_7KafYEaaJdBRkjWae00RXBYOIchwdo-USNumiYXORDrZrNlz_yBlCfbt-6lbPvcRfmFzdEwwnPUbwNa_0lFUnlRAm9KRJZpDMTJJTbDZcU07Vrw8ENZ8c3hQqS3b36Ly4U72qA5Jw]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/search/series?name=The+X-Files
+  response:
+    body:
+      string: !!binary |
+        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
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811b471e0b233c-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:12 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=d7e7572353cc525efe198935a1f98234c1464096671; expires=Wed,
+          24-May-17 13:31:11 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMwNzEsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2NjcxfQ.fMzw8EOsVrLuhCwUatMBBXrWDzUOQ_5Lknz65TsmkCMYHJCJLAAJ98xDselvWQyyOb3k_S22zYZne-bu6fGSE4hCoGF6SgVoA_GNtXKAONoiajyOU1BtF3lRKLyJoFjE7HUZcRDeb3L_qKtpVkP6Ah0TjEQ-AiD3k2Qnfnxd8FHGxIIa1fS9yjTmISI0r5HQ2tMmNmtqXsIF_7KafYEaaJdBRkjWae00RXBYOIchwdo-USNumiYXORDrZrNlz_yBlCfbt-6lbPvcRfmFzdEwwnPUbwNa_0lFUnlRAm9KRJZpDMTJJTbDZcU07Vrw8ENZ8c3hQqS3b36Ly4U72qA5Jw]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/77398
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA2RTXU/bQBB851eM/NJWSsAmEEjeKDRSK6VUpV9S1YfNeWNve96z7s6Aqfrfq3Mw
+        BfpmzezuzK7nfu8BWUmRsiV+7wFAJmW2xMnJbHE62QGBvXB4Tw1nS2Sfasa36Uosh+y+gKxQ4JAt
+        8X0AcF+Fx1V40oqXh3kxf/WM29UP0I/72RtSZZ+EK09tLYbswbyYVvs/2yp7YvBt8p3Niwc0UuyS
+        qezcaRTtRB86tuJDPBPPQ0+xWMym+WJa5COvHG+c/5XI1eU3vPx89eoZtVMbQd9plN19jo5HsGL1
+        /Pgo6z5E9v2/pa+MsBqersREcfp0c3fN/lr45tnRsXWmC1zCKWLN4NvWOokBbovV67c4q1hjwMrd
+        Yt3Zkv0EF6SEK9NZ20/wztWKC1dVHCNIS6ydiiF85J7DAMSaxUP0mkOUipKzANHoBr2WPKnzDdl9
+        rLxrULFyFIOmi5SU04hfYi2nGYFNDIgOhMq6DVkYp6EVT6ZPn4a9ilbDZOOsU7kbBNM2b8jHGpse
+        pCArrAgtG+EwQawloBEtpxtXVVa0mqDuGuddtzPgjKEgTsnaHlsvVR15ENplBcYzRS7T9PPaS8A5
+        +cgeNQVsmBVOOXlIvm6ct+WLgMaFiNa1nSWPYGS6lYPSU0MItbsJCKKGkX5F3TUby9hwJZpU0/mQ
+        UrY/ZsNSiJ/bMnnIliiO5kf57GQ+W4wvSny4oP5y+5V5SOHaaUl99oj+dJ+302We48P6IYkUU85T
+        Zr5Mi6MRlqbc7CIbY17k8+JkMVJ31B5K3JFvPuR5fpovjh9CTGXJT6I+AK/7bAntrB3fmkT+OCov
+        /gPPXacxW+LweLYH/Nn78xcAAP//AwD93+s0dwQAAA==
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811b4e051f15bf-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:13 GMT']
+      last-modified: ['Mon, 23 May 2016 21:07:19 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=d68885e42efe77f4a3c781e76717631be1464096672; expires=Wed,
+          24-May-17 13:31:12 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMwNzEsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2NjcxfQ.fMzw8EOsVrLuhCwUatMBBXrWDzUOQ_5Lknz65TsmkCMYHJCJLAAJ98xDselvWQyyOb3k_S22zYZne-bu6fGSE4hCoGF6SgVoA_GNtXKAONoiajyOU1BtF3lRKLyJoFjE7HUZcRDeb3L_qKtpVkP6Ah0TjEQ-AiD3k2Qnfnxd8FHGxIIa1fS9yjTmISI0r5HQ2tMmNmtqXsIF_7KafYEaaJdBRkjWae00RXBYOIchwdo-USNumiYXORDrZrNlz_yBlCfbt-6lbPvcRfmFzdEwwnPUbwNa_0lFUnlRAm9KRJZpDMTJJTbDZcU07Vrw8ENZ8c3hQqS3b36Ly4U72qA5Jw]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/77398/images/query?keyType=poster
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA8zYzWrbQBAH8LueYtlzqszMfusNSiCn3kopiqM4Sh3JWHKpCXn34tLapiysWHZM
+        Lj6sJEv82J35775VQsjHdm5lI75WQgjx9udXCNk/ykaQN97d/Bv60R2+HLadbITcjtPc7eTp0rR/
+        uOsOxyvnsad+0923rxf3T7fOqeA/Yf2yXZ9v3HXTuNnP/Tgcb7UefiEAXFxv535YT5+Hp1E2py8U
+        QrY/u127Pr7A3JxHV+N+mGUj0P8dez/90/y8f30Y2n5zfNH3Vbt67m5jn1ZdPPa/iHdUXoSKi9ja
+        R0y0zjChhEkgACxvooqbUE2xeQIZJiphgkCoGFB0cRSMThTEDBSdQNEKtGFAscVRdISEXAaJXUCi
+        GUgMw+IJsXmSU1BMavEgkLGKofGUrymmxhgL5fSedFFR3oIp7xIYWGyEJWSohCSKJnQckwU+cEyB
+        pIqx2mkGFWKYK6rYEqJ0adGgAoOLZqi40c5sc1z0EhcNDC7lO5GqY+uIchILLmhFhpCjuliGJOcK
+        1Vy0i1gYOhH6KwXcLBafZnFWMbBQ+eDioizK5GwQVdolgOZwoStVl6z9EKW7ERoiDhdgcIltinLC
+        C0GaxVLgOGa50slTzokCYVrFgbEMKuWji44Wl6wWTenoQgQce2iyDEU3FnWzDuXsIhaG5ELuI7O4
+        JIsyQTFsjKh8coEISlZpucwtlRDfqvffAAAA//8DAL1ZmHX6FwAA
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811b528eaf2366-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:14 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=dc4d0c08659e85b44e08ce255052384121464096673; expires=Wed,
+          24-May-17 13:31:13 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+version: 1
diff --git a/tests/cassettes/test_tvdb_lookup_api.TestTVDBSeriesWithActorsLookupAPI.test_tvdb_series_lookup_with_actors b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSeriesWithActorsLookupAPI.test_tvdb_series_lookup_with_actors
new file mode 100644
--- /dev/null
+++ b/tests/cassettes/test_tvdb_lookup_api.TestTVDBSeriesWithActorsLookupAPI.test_tvdb_series_lookup_with_actors
@@ -0,0 +1,212 @@
+interactions:
+- request:
+    body: '{"apikey": "4D297D8CFDE0E105"}'
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Connection: [keep-alive]
+      Content-Length: ['30']
+      Content-Type: [application/json]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: POST
+    uri: https://api.thetvdb.com/login
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAAwTByZZrQAAA0H1/RU72+ggR8nZiLJqqMssmByEoU0hieKf/ve/9/7Xb7V89ybv9
+        v90+X40y1bIKVobrb+BgV2ACncNlEjgBMkSBZJy/89Vocl2sYK3Qdo0XKFsz9OIJtA0BdV857dLk
+        yr25S2AC7XlNwnuRhCoN6n6x5Zi2ZMLYNWEK/A028eSK7LkdLefZA3JJa14DI6ZDZzRFw/x5DDx3
+        tNTR0n3vwlBcxCBz08XBtEOmvUaOmarAQ6yGgRbTZkn5uqyyuh83ZvrULnbwmZWrs83lZEwCdMKI
+        kTZtSk/1LcfzuhW8zKqtcEXpJUHBy0+yl1/hlj5rwVz0iiL3VGBUS2ab3WrzVjSy7+aZQqkSE+7g
+        jgnSFIS4dxwxn8J5JK5vt4HzCMkTtcnBZdMlw9RbzHOrDCIlYxqBqFIxEGLIMKiR3FMp5hWIR9Y7
+        bqwL6C4OG2++IXEphphmksMRUiYs8lhVVjJ4WMDwdVve8/SRg0osO7XSVMPCPk0zH3Xzfx6RkGov
+        vP/6/QMAAP//AwB1MATZ1wEAAA==
+    headers:
+      cf-ray: [2a811bdd7a76157d-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:36 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=dccc49f082f2f42f9ef3cd2250dcd5b3b1464096695; expires=Wed,
+          24-May-17 13:31:35 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMwOTYsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2Njk2fQ.IzA6SA39mrMRqoIkBbj7GIrQ0WRrKAJKLgp754MFrMHUTB2-5X2PKzHApKNW2mZXRKbFITP3GQIGY0Kh-UHDF3HUYlKbqGBNVvwEZRzwhsJs8ORWX2CzGsb6j_eQwyzf7D3Fm8ZPbBaPVtUactUiQm09GVwfoEEDo-VJixcNKnyN7MXr3ulqbOCiAa51SraPGEPP5uYX2vfRgaSUNmVRgWkqPma1S3bxcQ-uAeeMhVXEc2l8kFCfpkkJDOVjPDo-bQ7EOQr3T4z3SI0nYWlTw_PAxfpY02a14O-KOfeYFEykpTQ8QOt_xuwsvDViAhnFiGFJMQU002vFzULgX8bGtQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/search/series?name=The+X-Files
+  response:
+    body:
+      string: !!binary |
+        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
+        5xcAAP//AwBobC9LgQsAAA==
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811be4789b269c-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:37 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=db20f0d8b32907475430bc9e1cf0323421464096697; expires=Wed,
+          24-May-17 13:31:37 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMwOTYsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2Njk2fQ.IzA6SA39mrMRqoIkBbj7GIrQ0WRrKAJKLgp754MFrMHUTB2-5X2PKzHApKNW2mZXRKbFITP3GQIGY0Kh-UHDF3HUYlKbqGBNVvwEZRzwhsJs8ORWX2CzGsb6j_eQwyzf7D3Fm8ZPbBaPVtUactUiQm09GVwfoEEDo-VJixcNKnyN7MXr3ulqbOCiAa51SraPGEPP5uYX2vfRgaSUNmVRgWkqPma1S3bxcQ-uAeeMhVXEc2l8kFCfpkkJDOVjPDo-bQ7EOQr3T4z3SI0nYWlTw_PAxfpY02a14O-KOfeYFEykpTQ8QOt_xuwsvDViAhnFiGFJMQU002vFzULgX8bGtQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/77398
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA2RTXU/bQBB851eM/NJWSsAmEEjeKDRSK6VUpV9S1YfNeWNve96z7s6Aqfrfq3Mw
+        BfpmzezuzK7nfu8BWUmRsiV+7wFAJmW2xMnJbHE62QGBvXB4Tw1nS2Sfasa36Uosh+y+gKxQ4JAt
+        8X0AcF+Fx1V40oqXh3kxf/WM29UP0I/72RtSZZ+EK09tLYbswbyYVvs/2yp7YvBt8p3Niwc0UuyS
+        qezcaRTtRB86tuJDPBPPQ0+xWMym+WJa5COvHG+c/5XI1eU3vPx89eoZtVMbQd9plN19jo5HsGL1
+        /Pgo6z5E9v2/pa+MsBqersREcfp0c3fN/lr45tnRsXWmC1zCKWLN4NvWOokBbovV67c4q1hjwMrd
+        Yt3Zkv0EF6SEK9NZ20/wztWKC1dVHCNIS6ydiiF85J7DAMSaxUP0mkOUipKzANHoBr2WPKnzDdl9
+        rLxrULFyFIOmi5SU04hfYi2nGYFNDIgOhMq6DVkYp6EVT6ZPn4a9ilbDZOOsU7kbBNM2b8jHGpse
+        pCArrAgtG+EwQawloBEtpxtXVVa0mqDuGuddtzPgjKEgTsnaHlsvVR15ENplBcYzRS7T9PPaS8A5
+        +cgeNQVsmBVOOXlIvm6ct+WLgMaFiNa1nSWPYGS6lYPSU0MItbsJCKKGkX5F3TUby9hwJZpU0/mQ
+        UrY/ZsNSiJ/bMnnIliiO5kf57GQ+W4wvSny4oP5y+5V5SOHaaUl99oj+dJ+302We48P6IYkUU85T
+        Zr5Mi6MRlqbc7CIbY17k8+JkMVJ31B5K3JFvPuR5fpovjh9CTGXJT6I+AK/7bAntrB3fmkT+OCov
+        /gPPXacxW+LweLYH/Nn78xcAAP//AwD93+s0dwQAAA==
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811bea48d3266c-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:38 GMT']
+      last-modified: ['Mon, 23 May 2016 21:07:19 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=dcf675c2d81a15b46762ed7d908cc7c161464096697; expires=Wed,
+          24-May-17 13:31:37 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMwOTYsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2Njk2fQ.IzA6SA39mrMRqoIkBbj7GIrQ0WRrKAJKLgp754MFrMHUTB2-5X2PKzHApKNW2mZXRKbFITP3GQIGY0Kh-UHDF3HUYlKbqGBNVvwEZRzwhsJs8ORWX2CzGsb6j_eQwyzf7D3Fm8ZPbBaPVtUactUiQm09GVwfoEEDo-VJixcNKnyN7MXr3ulqbOCiAa51SraPGEPP5uYX2vfRgaSUNmVRgWkqPma1S3bxcQ-uAeeMhVXEc2l8kFCfpkkJDOVjPDo-bQ7EOQr3T4z3SI0nYWlTw_PAxfpY02a14O-KOfeYFEykpTQ8QOt_xuwsvDViAhnFiGFJMQU002vFzULgX8bGtQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/77398/images/query?keyType=poster
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA8zWyWrDMBAA0Hu+QuicOprRYtl/UAo99dZDURIlcZvYIbZLQ+i/F3dJQhHICKn0
+        4sNItsVjFp0mhNCl6QwtyeOEEEJOn09CaLWkJUEtdT79Cb3Y48Nxb2lJ6L5pO3ug56W2n9/Z47By
+        ia2qrb03u6v97SzPeaFvIHvery8bD7Zttn1XNfWwVWn2Boyxq3XTVfW6va1XDS3PJySEmld7MOvh
+        B3J6iS6avu5oSUB/x97PX+o2/W5em2o7/OhpYRYbO3MdbXL12m8RnWN8EYwuojLtMBEiwAQ9JgUy
+        BvFNeHQTzNCVJyzAhHtMgCHwBCgiOgo4EwUgAEV4UARnQiZAUdFRhIME8wASNYJEJCCRCYqncOVJ
+        SEORvuIBhlLxBIMnfk+RGbhYMGT2+JsK14rJ+C5FAhblYCkCVAovikDIUyQL+8fXFOZVkUrkIoEK
+        JsgVHq2E0N9aBONFAheRoOM6J7MKcRFjXARL4BJ/EvHMVUcYcmOBEaNIIqToLirBTS6P1HNBjWJJ
+        MIlA/9EF94vlAwAA///M2MERgEAIA8C/VVgCFzzwirEUe/frgxmUuTi2sI+Q8JJlz1nclMCC+cXF
+        QxbtlYGoucuQjeGCj9KltIeQX6PWAYaLEFyiUVQpL5CcxTAYb5aPPk+VjwJaruLSjaAyv7psYbiU
+        TjTy6gIIY0PDCKEbVd3SU84esRCaC/zPLJ6yaB9KGEaY31wkQClFy723LOt6LOcFAAD//wMAvVmY
+        dfoXAAA=
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811beea1d8274a-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:39 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=dd59bfb554f4db68a4423bffe34b69c141464096698; expires=Wed,
+          24-May-17 13:31:38 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+- request:
+    body: null
+    headers:
+      Accept: ['*/*']
+      Accept-Encoding: ['gzip, deflate']
+      Authorization: [!!python/unicode Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjQxODMwOTYsImlkIjoiRmxleEdldCIsIm9yaWdfaWF0IjoxNDY0MDk2Njk2fQ.IzA6SA39mrMRqoIkBbj7GIrQ0WRrKAJKLgp754MFrMHUTB2-5X2PKzHApKNW2mZXRKbFITP3GQIGY0Kh-UHDF3HUYlKbqGBNVvwEZRzwhsJs8ORWX2CzGsb6j_eQwyzf7D3Fm8ZPbBaPVtUactUiQm09GVwfoEEDo-VJixcNKnyN7MXr3ulqbOCiAa51SraPGEPP5uYX2vfRgaSUNmVRgWkqPma1S3bxcQ-uAeeMhVXEc2l8kFCfpkkJDOVjPDo-bQ7EOQr3T4z3SI0nYWlTw_PAxfpY02a14O-KOfeYFEykpTQ8QOt_xuwsvDViAhnFiGFJMQU002vFzULgX8bGtQ]
+      Connection: [keep-alive]
+      User-Agent: [!!python/unicode FlexGet/2.0.30.dev (www.flexget.com)]
+    method: GET
+    uri: https://api.thetvdb.com/series/77398/actors
+  response:
+    body:
+      string: !!binary |
+        H4sIAAAAAAAAA7yXTW/bOBCG7/kVA51XWX7ow+LNjjdN07gbJF10ge0eGImQuJbJgJLSGkX/+0Jy
+        JWphm7IBYy8+aIbmq0fvzJDfrwC8jNfcY/DXFQDA9+4XwJOZxyAMSRj+0j+qhJGiet8G4pgmsyGg
+        +EZ4DLy5UvxF1AW8k1XhDWGjyy680kqmHJ7EVlQ2WmlT/24yYTwGdFgjNzzvFvG01qb6tVNy/c9r
+        bhd2KfOmLnS7lFArdBfJMtFK9QjCxEfUxwhwyELMQmr/pORV/cdrxuvjud3r/9gp28cTDZIn8axk
+        nRbwKEuR59JK6PF85mUtDDyvpVLC2PgYEBl2OwQougSgYMYwtrvvA4p8hH0SAkpYSBkOPTegeJA8
+        CeidLEvJFcxVJkyllVXRM1pyxeE5bcpya4NjQHjY7RCg+CKAIhbEdvd9QCO3BV2uG5Cto0lAS/4m
+        M1g2aaHf1IhAj+dWf4NVU7bFNHAY00HD00N0ZhehEzCK7O5uOl2um04ySJ6k86RfhKnhkddGpmur
+        oadzrwsFS53noq5tdMzH3X+SS/AJExY4+VAfE58kbXnhxF1eBEdoZh0/CWgpuII7npeNyiyAHs+T
+        TAtuMvjiPUmV6y8ePHCVHyu046h2qi7CCjE6s0KdXgq73ONealUlZ7BamCYVcMfNV60PwOq8tNgK
+        c/Yk2wm5BJ4gYSQ5Ec8u14kHozPwfNIbWBgus8N4VqJ8kwpujS7kWliNpxUbwRFG+CKIEAudw2zc
+        q7tcNyJ8BqLP3TTbwOIa2r49MkpfcTcy50bUtYDnjV5LlcOKj4beGNbxwd/CwheBRZOJcvtva0Ku
+        yU9wEodnwPoo00KXvIIHwa1delDzUnyDD2abilFbH+NxdaNWiMtLdIZnNBjGzN7hkbaHRxQBxoxG
+        E3bay3XYKQkicgahe74RFTzKdC1UBffm+hCmtug+NGZ8+j4RU6fGhYnghEZW7x4m0h0LSXvGpjGj
+        U1WHfTLKdWGKSGy3nZxxN9xs4bfy6/iK0dvodvEe5lUlq5qrGpbSiPZy0faxDG51WW6OnZsc9kpa
+        eU5up15MKCMnD7su9zg0GiMaW0tPQnuuxZtQ8LNjHehUK3MNf1rDTXjKJu5c0t/RVFOWR+rMLtmf
+        8pGPAh9hwLR1FiGOC0f34mdcye6FMdt2ymdy1Hh7vyyFeIVPhdH87PPiTojLF0FIZshejvbqqX9r
+        lLAgYqHzzLiXO2GNM64cD7wxUsCdLjNxANGKG1lzuNFv3JjmRfIK7Kf8322CfRIAjltgweynTa4A
+        /r768S8AAAD//wMA87A9H+oQAAA=
+    headers:
+      cache-control: ['private, max-age=600']
+      cf-ray: [2a811bf7bd9d08a5-FRA]
+      connection: [keep-alive]
+      content-encoding: [gzip]
+      content-type: [application/json]
+      date: ['Tue, 24 May 2016 13:31:40 GMT']
+      server: [cloudflare-nginx]
+      set-cookie: ['__cfduid=defdf23be9db88bdc8f557afdc26c584a1464096700; expires=Wed,
+          24-May-17 13:31:40 GMT; path=/; domain=.thetvdb.com; HttpOnly']
+      vary: [Accept-Language]
+      x-powered-by: [Thundar!]
+      x-thetvdb-api-version: [2.1.0]
+    status: {code: 200, message: OK}
+version: 1
diff --git a/tests/test_tvdb_lookup_api.py b/tests/test_tvdb_lookup_api.py
new file mode 100644
--- /dev/null
+++ b/tests/test_tvdb_lookup_api.py
@@ -0,0 +1,305 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals, division, absolute_import
+
+from builtins import *  # pylint: disable=unused-import, redefined-builtin
+
+import pytest
+
+from flexget.utils import json
+
+
+@pytest.mark.online
+class TestTVDBSeriesLookupAPI(object):
+    config = 'tasks: {}'
+
+    def test_tvdb_series_lookup(self, api_client):
+        expected_response = {
+            "airs_dayofweek": "Monday",
+            "airs_time": "8:00 PM",
+            "aliases": [
+                "The X Files",
+                "The X-Files (2016)",
+                "The XFiles"
+            ],
+            "banner": "http://thetvdb.com/banners/graphical/61-g.jpg",
+            "content_rating": "TV-14",
+            "expired": False,
+            "first_aired": "Fri, 10 Sep 1993 00:00:00 GMT",
+            "genres": [
+                "Mystery",
+                "Science-Fiction"
+            ],
+            "imdb_id": "tt0106179",
+            "language": "en",
+            "last_updated": "2016-05-23 21:07:19",
+            "network": "FOX (US)",
+            "overview": "The X-Files focused on the exploits of FBI Agents Fox Mulder, Dana Scully, John Doggett and "
+                        "Monica Reyes and their investigations into the paranormal. From genetic mutants and killer "
+                        "insects to a global conspiracy concerning the colonization of Earth by an alien species, this"
+                        " mind-boggling, humorous and occasionally frightening series created by Chris Carter has been"
+                        " one of the world's most popular sci-fi/drama shows since its humble beginnings in 1993.",
+            "posters": [
+                "http://thetvdb.com/banners/posters/77398-1.jpg",
+                "http://thetvdb.com/banners/posters/77398-2.jpg",
+                "http://thetvdb.com/banners/posters/77398-3.jpg",
+                "http://thetvdb.com/banners/posters/77398-4.jpg",
+                "http://thetvdb.com/banners/posters/77398-6.jpg"
+            ],
+            "rating": 9,
+            "runtime": 45,
+            "series_name": "The X-Files",
+            "status": "Continuing",
+            "tvdb_id": 77398,
+            "zap2it_id": "EP00080955"
+        }
+
+        rsp = api_client.get('/tvdb/series/The X-Files/')
+        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
+
+        data = json.loads(rsp.get_data(as_text=True))
+        assert data == expected_response
+
+
+@pytest.mark.online
+class TestTVDBSeriesWithActorsLookupAPI(object):
+    config = 'tasks: {}'
+
+    def test_tvdb_series_lookup_with_actors(self, api_client):
+        expected_response = {
+            "airs_dayofweek": "Monday",
+            "airs_time": "8:00 PM",
+            "aliases": [
+                "The X Files",
+                "The X-Files (2016)",
+                "The XFiles"
+            ],
+            "actors": [
+                "Annabeth Gish",
+                "Mitch Pileggi",
+                "Gillian Anderson",
+                "David Duchovny",
+                "Robert Patrick",
+                "Dean Haglund",
+                "Bruce Harwood",
+                "Tom Braidwood",
+                "William B. Davis",
+                "Nicholas Lea",
+                "James Pickens Jr.",
+                "Cary Elwes",
+                "Steven Williams",
+                "Jerry Hardin",
+                "Laurie Holden"
+            ],
+            "banner": "http://thetvdb.com/banners/graphical/61-g.jpg",
+            "content_rating": "TV-14",
+            "expired": False,
+            "first_aired": "Fri, 10 Sep 1993 00:00:00 GMT",
+            "genres": [
+                "Mystery",
+                "Science-Fiction"
+            ],
+            "imdb_id": "tt0106179",
+            "language": "en",
+            "last_updated": "2016-05-23 21:07:19",
+            "network": "FOX (US)",
+            "overview": "The X-Files focused on the exploits of FBI Agents Fox Mulder, Dana Scully, John Doggett and "
+                        "Monica Reyes and their investigations into the paranormal. From genetic mutants and killer "
+                        "insects to a global conspiracy concerning the colonization of Earth by an alien species, this"
+                        " mind-boggling, humorous and occasionally frightening series created by Chris Carter has been"
+                        " one of the world's most popular sci-fi/drama shows since its humble beginnings in 1993.",
+            "posters": [
+                "http://thetvdb.com/banners/posters/77398-1.jpg",
+                "http://thetvdb.com/banners/posters/77398-2.jpg",
+                "http://thetvdb.com/banners/posters/77398-3.jpg",
+                "http://thetvdb.com/banners/posters/77398-4.jpg",
+                "http://thetvdb.com/banners/posters/77398-6.jpg"
+            ],
+            "rating": 9,
+            "runtime": 45,
+            "series_name": "The X-Files",
+            "status": "Continuing",
+            "tvdb_id": 77398,
+            "zap2it_id": "EP00080955"
+        }
+
+        rsp = api_client.get('/tvdb/series/The X-Files/?include_actors=true')
+        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
+
+        data = json.loads(rsp.get_data(as_text=True))
+        assert data == expected_response
+
+
+@pytest.mark.online
+class TestTVDBEpisodeLookupAPI(object):
+    config = 'tasks: {}'
+
+    def test_tvdb_episode_lookup_season_and_ep_number(self, api_client):
+        rsp = api_client.get('/tvdb/episode/77398/')
+        assert rsp.status_code == 500, 'Response code is %s' % rsp.status_code
+
+        expected_response = {
+            "absolute_number": None,
+            "director": "Chris Carter",
+            "episode_name": "My Struggle II",
+            "episode_number": 6,
+            "expired": False,
+            "first_aired": "Mon, 22 Feb 2016 00:00:00 GMT",
+            "id": 5313345,
+            "image": "http://thetvdb.com/banners/episodes/77398/5313345.jpg",
+            "last_update": 1456573658,
+            "overview": "The investigations that Mulder and Scully began with Tad O’Malley have awakened powerful "
+                        "enemies. A panic begins as people all over the country suddenly start falling ill, "
+                        "and Scully looks for a cure. Mulder confronts the man whom he believes to be behind it all,"
+                        " but another figure from their past may prove to be the key.",
+            "rating": 7.3,
+            "season_number": 10,
+            "series_id": 77398
+        }
+
+        rsp = api_client.get('/tvdb/episode/77398/?season_number=10&ep_number=6')
+        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
+
+        data = json.loads(rsp.get_data(as_text=True))
+        assert data == expected_response
+
+    def test_tvdb_episode_lookup_by_absolute_number(self, api_client):
+        expected_response = {
+            "absolute_number": 46,
+            "director": "Antonio Negret",
+            "episode_name": "The Race of His Life",
+            "episode_number": 23,
+            "expired": False,
+            "first_aired": "Tue, 24 May 2016 00:00:00 GMT",
+            "id": 5598674,
+            "image": "http://thetvdb.com/banners/episodes/279121/5598674.jpg",
+            "last_update": 1463604393,
+            "overview": "Barry vows to stop Zoom after learning Zoom's true plans.",
+            "rating": 0,
+            "season_number": 2,
+            "series_id": 279121
+        }
+
+        rsp = api_client.get('/tvdb/episode/279121/?absolute_number=46')
+        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
+
+        data = json.loads(rsp.get_data(as_text=True))
+        assert data == expected_response
+
+
+@pytest.mark.online
+class TestTVDBSearchLookupAPI(object):
+    config = 'tasks: {}'
+
+    def test_tvdb_search_results_by_name(self, api_client):
+        expected_response = {u'search_results': [{u'status': u'Continuing', u'network': u'The CW',
+                                                  u'overview': u'Two brothers follow their father\'s footsteps as "hunters" fighting evil supernatural beings of many kinds including monsters, demons, and gods that roam the earth.',
+                                                  u'tvdb_id': 78901, u'series_name': u'Supernatural',
+                                                  u'first_aired': u'Tue, 13 Sep 2005 00:00:00 GMT',
+                                                  u'banner': u'http://thetvdb.com/banners/graphical/78901-g46.jpg',
+                                                  u'aliases': []}, {u'status': u'Ended', u'network': u'The CW',
+                                                                    u'overview': u'Supernatural the Animation will not only remake the best episodes from the live-action version, but also depict original episodes. These original episodes will include prologues of the Winchester brothers\u2019 childhood, anime-only enemies, and episodes featuring secondary characters from the original series.',
+                                                                    u'tvdb_id': 197001,
+                                                                    u'series_name': u'Supernatural the Animation',
+                                                                    u'first_aired': u'Wed, 12 Jan 2011 00:00:00 GMT',
+                                                                    u'banner': u'http://thetvdb.com/banners/graphical/197001-g2.jpg',
+                                                                    u'aliases': [u'Supernatural: The Animation']},
+                                                 {u'status': u'Ended', u'network': u'BBC', u'overview': None,
+                                                  u'tvdb_id': 79426, u'series_name': u'Supernatural Science',
+                                                  u'first_aired': u'Thu, 09 Nov 2006 00:00:00 GMT',
+                                                  u'banner': u'http://thetvdb.com/banners/graphical/z79426-g.jpg',
+                                                  u'aliases': []}, {u'status': u'Ended', u'network': u'BBC One',
+                                                                    u'overview': u'Supernatural is a British anthology television series that was produced by the BBC in 1977. The series consisted of 8 episodes and was broadcast on BBC1. In each episode, a different prospective member of the "Club of the Damned" would be required to tell a horror story, and their application for membership would be judged on how frightening the story was. ',
+                                                                    u'tvdb_id': 74143,
+                                                                    u'series_name': u'The Supernatural (1977)',
+                                                                    u'first_aired': u'Wed, 01 Jun 1977 00:00:00 GMT',
+                                                                    u'banner': None,
+                                                                    u'aliases': [u'The Supernatural 1977']},
+                                                 {u'status': u'Ended', u'network': u'BBC',
+                                                  u'overview': u"When science fiction becomes science fact.\r\nThis groundbreaking series unravels the extra-sensory feats and near-paranormal powers of animals. It journeys to the outer limits of scientific knowledge to find a parallel animal universe where life exists in other realities and has powers that almost defy belief. Here sharks perceive human electric auras and dolphins use ultrasound to 'see' a human foetus in the womb. There are monkey herbalists, frogs that have mastered the art of cryogenics and lizards that walk on water or cry blood. \r\n\r\nSupernatural not only looks at animal hypnosis and the healing powers of fish and dolphins, it even explains weird phenomena such as animals foretelling earthquakes or forecasting the weather and fish that 'rain' from the sky.",
+                                                  u'tvdb_id': 79432,
+                                                  u'series_name': u'Supernatural The Unseen Powers of Animals',
+                                                  u'first_aired': u'Tue, 30 Mar 1999 00:00:00 GMT',
+                                                  u'banner': u'http://thetvdb.com/banners/graphical/z79432-g.jpg',
+                                                  u'aliases': []}, {u'status': u'', u'network': u'The Weather Channel',
+                                                                    u'overview': u'Weather-inspired legends in the U.S. are explored in this series',
+                                                                    u'tvdb_id': 287236,
+                                                                    u'series_name': u'American Super/Natural',
+                                                                    u'first_aired': u'Sun, 05 Oct 2014 00:00:00 GMT',
+                                                                    u'banner': u'http://thetvdb.com/banners/graphical/287236-g.jpg',
+                                                                    u'aliases': []},
+                                                 {u'status': u'Ended', u'network': u'Discovery',
+                                                  u'overview': u'Does life end in death? Or does the soul wander from body to body? Are there such things as demons, ghosts or the devil? Following circumstantial research and in cooperation with top-calibre scholars, this series sheds light upon, unmasks and takes the magic from centuries-old superstition and also reports on breathtaking, super sensory experiences. It also shows if, and where, things that cannot be explained really do exist? The journey in search of the Supernatural leads to all six continents, to such fascinating spots as the holy Tibetan city, Lhasa and to the great universities of the world; to the secret archives of the CIA and the KGB, the Vatican, and to the most modern centres of nuclear research in the world. The result is a thrilling combination of contemporary history, scientific background reporting, and a touch of the pleasant shiver within the dark side of parapsychology.',
+                                                  u'tvdb_id': 154401,
+                                                  u'series_name': u'5th Dimension - Secrets of the Supernatural',
+                                                  u'first_aired': u'Sat, 21 Jan 2006 00:00:00 GMT',
+                                                  u'banner': u'http://thetvdb.com/banners/graphical/154401-g.jpg',
+                                                  u'aliases': [u'5th Dimension  Secrets of the Supernatural']},
+                                                 {u'status': u'Continuing', u'network': u'Destination America',
+                                                  u'overview': u'Mysterious phenomena are explored using scientific techniques in this series.',
+                                                  u'tvdb_id': 294240, u'series_name': u'True Supernatural',
+                                                  u'first_aired': u'Wed, 08 Apr 2015 00:00:00 GMT',
+                                                  u'banner': u'http://thetvdb.com/banners/text/294240.jpg',
+                                                  u'aliases': []}, {u'status': u'Ended', u'network': u'TV Tokyo',
+                                                                    u'overview': u'Half a year ago, the four members of a literature club, as well as the elementary school niece of their faculty adviser, were bestowed with supernatural powers. The boy in the club, Ando Jurai, became able to produce black flames. The girls acquired a variety of powerful abilities: Tomoyo could slow, speed, or stop time, Hatoko could control the five elements (earth, water, fire, wind, light), little Chifuyu could create things, and Sayumi could repair objects or heal living things. However, since they gained these powers, nothing has really changed in their everyday life. Why have they been given these powers in the first place? Will the heroic fantasy life they imagined these powers would bring ever actually arrive?',
+                                                                    u'tvdb_id': 283937,
+                                                                    u'series_name': u'When Supernatural Battles Became Commonplace',
+                                                                    u'first_aired': u'Tue, 07 Oct 2014 00:00:00 GMT',
+                                                                    u'banner': u'http://thetvdb.com/banners/graphical/283937-g.jpg',
+                                                                    u'aliases': [
+                                                                        u'Inou Battle wa Nichijou-kei no Naka de',
+                                                                        u'Inou Battle Within Everyday Life',
+                                                                        u'Inou-Battle in the Usually Daze',
+                                                                        u'Inou-Battle in the Usually Daze.',
+                                                                        u'Inou-Battle wa Nichijou-kei no Naka de']}]}
+
+        rsp = api_client.get('/tvdb/search/?search_name=supernatural')
+        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
+
+        data = json.loads(rsp.get_data(as_text=True))
+        assert data == expected_response
+
+    def test_tvdb_search_results_by_imdb_id(self, api_client):
+        expected_response = {
+            u'search_results': [
+                {u'status': u'Continuing',
+                 u'network': u'HBO',
+                 u'overview': u"Seven noble families fight for control of the mythical land of Westeros. "
+                              u"Friction between the houses leads to full-scale war. All while a very ancient"
+                              u" evil awakens in the farthest north. Amidst the war, a neglected military order "
+                              u"of misfits, the Night's Watch, is all that stands between the realms of men and the "
+                              u"icy horrors beyond.",
+                 u'tvdb_id': 121361,
+                 u'series_name': u'Game of Thrones',
+                 u'first_aired': u'Sun, 17 Apr 2011 00:00:00 GMT',
+                 u'banner': u'http://thetvdb.com/banners/graphical/121361-g19.jpg',
+                 u'aliases': []}]}
+        rsp = api_client.get('/tvdb/search/?imdb_id=tt0944947')
+        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
+
+        data = json.loads(rsp.get_data(as_text=True))
+        assert data == expected_response
+
+    def test_tvdb_search_results_by_zap2it_id(self, api_client):
+        expected_response = {
+            u'search_results': [
+                {u'status': u'Continuing',
+                 u'network': u'The CW',
+                 u'overview': u'After a particle accelerator causes a freak storm, CSI Investigator Barry Allen is '
+                              u'struck by lightning and falls into a coma. Months later he awakens with the power '
+                              u'of super speed, granting him the ability to move through Central City like an unseen '
+                              u'guardian angel. Though initially excited by his newfound powers, Barry is shocked to '
+                              u'discover he is not the only "meta-human" who was created in the wake of'
+                              u' the accelerator explosion \u2013 and not everyone is using their new powers '
+                              u'for good. Barry partners with S.T.A.R. Labs and dedicates his life to protect'
+                              u' the innocent. For now, only a few close friends and associates know that Barry '
+                              u'is literally the fastest man alive, but it won\'t be long before the world learns '
+                              u'what Barry Allen has become... The Flash.',
+                 u'tvdb_id': 279121, u'series_name': u'The Flash (2014)',
+                 u'first_aired': u'Tue, 07 Oct 2014 00:00:00 GMT',
+                 u'banner': u'http://thetvdb.com/banners/graphical/279121-g7.jpg',
+                 u'aliases': []}]}
+        rsp = api_client.get('/tvdb/search/?zap2it_id=EP01922936')
+        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
+
+        data = json.loads(rsp.get_data(as_text=True))
+        assert data == expected_response