Browse Source

Fix genre field in tvmaze_api.

tags/release_0.25.1
Prinz23 4 years ago
committed by JackDandy
parent
commit
4ae1bac11d
  1. 1
      CHANGES.md
  2. 4
      lib/tvmaze_api/tvmaze_api.py

1
CHANGES.md

@ -89,6 +89,7 @@
* Fix use show id when adding from TVmaze card * Fix use show id when adding from TVmaze card
* Change revert all IMDb ids to 7 chars * Change revert all IMDb ids to 7 chars
* Fix new unique_name in templates * Fix new unique_name in templates
* Fix genre field in tvmaze_api
### 0.24.15 (2021-08-05 11:45:00 UTC) ### 0.24.15 (2021-08-05 11:45:00 UTC)

4
lib/tvmaze_api/tvmaze_api.py

@ -319,7 +319,7 @@ class TvMaze(TVInfoBase):
if 'days' in show_data.schedule: if 'days' in show_data.schedule:
show_obj['airs_dayofweek'] = ', '.join(show_data.schedule['days']) show_obj['airs_dayofweek'] = ', '.join(show_data.schedule['days'])
if show_data.genres: if show_data.genres:
show_obj['genre'] = ','.join(show_data.genres) show_obj['genre'] = '|%s|' % '|'.join(show_data.genres)
if (actors or self.config['actors_enabled']) and not getattr(self.shows.get(sid), 'actors_loaded', False): if (actors or self.config['actors_enabled']) and not getattr(self.shows.get(sid), 'actors_loaded', False):
if show_data.cast: if show_data.cast:
@ -574,7 +574,7 @@ class TvMaze(TVInfoBase):
ti_show.vote_average = show_data.rating and show_data.rating.get('average') ti_show.vote_average = show_data.rating and show_data.rating.get('average')
ti_show.popularity = show_data.weight ti_show.popularity = show_data.weight
ti_show.genre_list = show_data.genres or [] ti_show.genre_list = show_data.genres or []
ti_show.genre = ', '.join(ti_show.genre_list) ti_show.genre = '|%s|' % '|'.join(ti_show.genre_list)
ti_show.official_site = show_data.official_site ti_show.official_site = show_data.official_site
ti_show.status = show_data.status ti_show.status = show_data.status
ti_show.show_type = show_data.type ti_show.show_type = show_data.type

Loading…
Cancel
Save