Skip to content

Commit

Permalink
Update tmdbapi.py
Browse files Browse the repository at this point in the history
  • Loading branch information
apo86 committed Oct 16, 2022
1 parent b882428 commit 0e76a74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/lib/tmdbscraper/tmdbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,23 @@
CONFIG_URL = BASE_URL.format('configuration')


def search_movie(query, year=None, language=None):
def search_movie(query, year=None, language=None, page=None):
# type: (Text) -> List[InfoType]
"""
Search for a movie
:param title: movie title to search
:param year: the year to search (optional)
:param language: the language filter for TMDb (optional)
:param page: the results page to return (optional)
:return: a list with found movies
"""
xbmc.log('using title of %s to find movie' % query, xbmc.LOGDEBUG)
theurl = SEARCH_URL
params = _set_params(None, language)
params['query'] = query
if page is not None:
params['page'] = page
if year is not None:
params['year'] = str(year)
return api_utils.load_info(theurl, params=params)
Expand Down

0 comments on commit 0e76a74

Please sign in to comment.