Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[metadata.themoviedb.org.python@matrix] 1.5.1+matrix.1 #319

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions metadata.themoviedb.org.python/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="metadata.themoviedb.org.python"
name="The Movie Database Python"
version="1.5.0+matrix.1"
version="1.5.1+matrix.1"
provider-name="Team Kodi">
<requires>
<import addon="xbmc.metadata" version="2.1.0"/>
Expand All @@ -11,7 +11,10 @@
library="python/scraper.py"/>
<extension point="xbmc.addon.metadata">
<reuselanguageinvoker>true</reuselanguageinvoker>
<news>v1.5.0 (2021-10-16)
<news>v1.5.1 (2021-10-19)
- Fix: search error when no year

v1.5.0 (2021-10-16)
- Feature: downloading logos from tmdb
- Feature: search language option added
- Change: searching movies from different years if not found
Expand Down
3 changes: 3 additions & 0 deletions metadata.themoviedb.org.python/changelog.txt
@@ -1,3 +1,6 @@
v1.5.1 (2021-10-19)
- Fix: search error when no year

v1.5.0 (2021-10-16)
- Feature: downloading logos from tmdb
- Feature: search language option added
Expand Down
7 changes: 4 additions & 3 deletions metadata.themoviedb.org.python/python/scraper.py
Expand Up @@ -31,16 +31,17 @@ def search_for_movie(title, year, handle, settings):
title = _strip_trailing_article(title)
scraper = get_tmdb_scraper(settings)

search_results = scraper.search(title, year)
if year is not None:
search_results = scraper.search(title, year)
if not search_results:
search_results = scraper.search(title,str(int(year)-1))
if not search_results:
search_results = scraper.search(title,str(int(year)+1))
if not search_results:
search_results = scraper.search(title)
if not search_results:
search_results = scraper.search(title)
if not search_results:
return

if 'error' in search_results:
header = "The Movie Database Python error searching with web service TMDB"
xbmcgui.Dialog().notification(header, search_results['error'], xbmcgui.NOTIFICATION_WARNING)
Expand Down