diff --git a/CHANGES.md b/CHANGES.md index bb08c54..e87e75e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -89,6 +89,7 @@ * Fix use show id when adding from TVmaze card * Change revert all IMDb ids to 7 chars * Fix new unique_name in templates +* Fix genre field in tvmaze_api ### 0.24.15 (2021-08-05 11:45:00 UTC) diff --git a/lib/tvmaze_api/tvmaze_api.py b/lib/tvmaze_api/tvmaze_api.py index bb3d64a..ad1865e 100644 --- a/lib/tvmaze_api/tvmaze_api.py +++ b/lib/tvmaze_api/tvmaze_api.py @@ -319,7 +319,7 @@ class TvMaze(TVInfoBase): if 'days' in show_data.schedule: show_obj['airs_dayofweek'] = ', '.join(show_data.schedule['days']) 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 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.popularity = show_data.weight 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.status = show_data.status ti_show.show_type = show_data.type