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

Feature/fix early wanted #10668

Merged
merged 3 commits into from
May 25, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions medusa/indexers/tvmaze/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ def _get_show_by_id(self, tvmaze_id, request_language='en'): # pylint: disable=
return

mapped_results = self._map_results(results, self.series_map)

# Sanitize the airs_time. As for some shows this might be missing.
if not mapped_results.get('airs_time'):
mapped_results['airs_time'] = '0:00AM'

return OrderedDict({'series': mapped_results})

def _get_episodes(self, tvmaze_id, specials=False, *args, **kwargs): # pylint: disable=unused-argument
Expand Down
6 changes: 6 additions & 0 deletions medusa/tv/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,12 @@ def load_from_indexer(self, tvapi=None, limit_seasons=None):
if getattr(indexed_show, 'airs_dayofweek', '') and getattr(indexed_show, 'airs_time', ''):
self.airs = '{airs_day_of_week} {airs_time}'.format(airs_day_of_week=indexed_show['airs_dayofweek'],
airs_time=indexed_show['airs_time'])
else:
log.info(
'{id}: We could not determin a specific `airs_dayofweek` or `airs_time` for the show: {show}'
'\n We might start searching early for episodes.',
{'id': self.series_id, 'show': self.name}
)

self.status = self.normalize_status(getattr(indexed_show, 'status', None))

Expand Down