Skip to content

Commit

Permalink
Merge pull request #18 from amirotin/master
Browse files Browse the repository at this point in the history
fix: Исправлен поиск по kinopoisk id
  • Loading branch information
Jenstel authored Nov 4, 2021
2 parents 15f16ff + 2db1b00 commit 7847aa8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Contents/Libraries/Shared/kinoplex/sources/kinopoisk.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ def _api_search(self, matches, media_name):
def find_by_id(self, movie_id):
movie_data = self.make_request(self.conf.api.film_details, movie_id)
if movie_data:
return movie_data['nameRU'], int(movie_data.get('year').split('-', 1)[0] or 0)
return movie_data.get('nameRu',
movie_data.get('nameEn', 'Unknown movie name %s' % movie_id)), movie_data.get('year',
0)
return None, None

def search(self, results, media, lang, manual=False, primary=True):
Expand Down

0 comments on commit 7847aa8

Please sign in to comment.