Skip to content

Commit

Permalink
Remove old shows (#20)
Browse files Browse the repository at this point in the history
Trakt api retrieves old shows.  Commit prevents addition of shows older than current day.
  • Loading branch information
PlayedIn authored and iantrich committed Feb 27, 2019
1 parent 8f7e873 commit a264cf8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/sensor/trakt.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def update(self):
_LOGGER.warning('api.themoviedb.org is not responding')
return
image_url = 'https://image.tmdb.org/t/p/w%s%s'
if days_until(show.airs_at.isoformat() + 'Z', self._tz) < 0:
continue
if days_until(show.airs_at.isoformat() + 'Z', self._tz) <= 7:
release = '$day, $time'
else:
Expand Down

0 comments on commit a264cf8

Please sign in to comment.