From b2947a5eda7c06aac4f14985e9e42acd2181ebc0 Mon Sep 17 00:00:00 2001 From: Miki Date: Fri, 21 May 2021 17:40:17 -0700 Subject: [PATCH 1/2] Add search by `slug` --- lib/tvdbsimple/search.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/tvdbsimple/search.py b/lib/tvdbsimple/search.py index fdb9fde..81cce93 100644 --- a/lib/tvdbsimple/search.py +++ b/lib/tvdbsimple/search.py @@ -19,13 +19,14 @@ class Search(TVDB): 'series_params': '/series/params' } - def series(self, name='', imdbId='', zap2itId='', language=''): + def series(self, name='', imdbId='', zap2itId='', slug='', language=''): """ Search series with the information provided. You can set `name` to search for a series with that name. You can set `imdbId` to search a series with the provided imdb id. You can set `zap2itId` - to search a series with the provided zap2it id. You can set `language` to + to search a series with the provided zap2it id. You can set `slug` + to search a series with the provided slug. You can set `language` to retrieve the results with the provided language. Returns a list series with basic information that matches your search. @@ -50,6 +51,8 @@ def series(self, name='', imdbId='', zap2itId='', language=''): filters['imdbId'] = imdbId if zap2itId: filters['zap2itId'] = zap2itId + if slug: + filters['slug'] = slug self._set_language(language) response = self._GET(path, params=filters) From 233b043b39c6e6b1dd39a2f92943f7a293c24897 Mon Sep 17 00:00:00 2001 From: Miki Date: Fri, 21 May 2021 17:40:17 -0700 Subject: [PATCH 2/2] Add search by `slug` --- addon.xml | 2 +- lib/tvdbsimple/search.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/addon.xml b/addon.xml index 758e040..144eaf5 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/lib/tvdbsimple/search.py b/lib/tvdbsimple/search.py index fdb9fde..81cce93 100644 --- a/lib/tvdbsimple/search.py +++ b/lib/tvdbsimple/search.py @@ -19,13 +19,14 @@ class Search(TVDB): 'series_params': '/series/params' } - def series(self, name='', imdbId='', zap2itId='', language=''): + def series(self, name='', imdbId='', zap2itId='', slug='', language=''): """ Search series with the information provided. You can set `name` to search for a series with that name. You can set `imdbId` to search a series with the provided imdb id. You can set `zap2itId` - to search a series with the provided zap2it id. You can set `language` to + to search a series with the provided zap2it id. You can set `slug` + to search a series with the provided slug. You can set `language` to retrieve the results with the provided language. Returns a list series with basic information that matches your search. @@ -50,6 +51,8 @@ def series(self, name='', imdbId='', zap2itId='', language=''): filters['imdbId'] = imdbId if zap2itId: filters['zap2itId'] = zap2itId + if slug: + filters['slug'] = slug self._set_language(language) response = self._GET(path, params=filters)