diff --git a/src/series/tasks.py b/src/series/tasks.py index e4811b2..732100b 100644 --- a/src/series/tasks.py +++ b/src/series/tasks.py @@ -39,7 +39,7 @@ def episode_counter(imdb_api_key, s, data): try: return new_episodes_count, int(last_n)+1, last_i+1 if new_episodes_count > 0 else 0, 0, 0 except UnboundLocalError: - return new_episodes_count, int(n)+1, last_i+1 if new_episodes_count > 0 else 0, 0, 0 + return new_episodes_count, int(n), last_i+1 if new_episodes_count > 0 else 0, 0, 0 last_i = i new_episodes_count += 1 last_n = n diff --git a/src/series/views/new_episodes.py b/src/series/views/new_episodes.py index 2fd92f8..a763dae 100644 --- a/src/series/views/new_episodes.py +++ b/src/series/views/new_episodes.py @@ -39,7 +39,7 @@ def episode_counter(request, s, data): try: return new_episodes_count, int(last_n)+1, last_i+1 if new_episodes_count > 0 else 0, 0, 0 except UnboundLocalError: - return new_episodes_count, int(n)+1, last_i+1 if new_episodes_count > 0 else 0, 0, 0 + return new_episodes_count, int(n), last_i+1 if new_episodes_count > 0 else 0, 0, 0 last_i = i new_episodes_count += 1