diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 2ef8363..fc27ba7 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -1481,7 +1481,7 @@ def calculate_episode_number(self): else: self_year = self.upload_date.year if self.upload_date else self.created.year filtered_media = Media.objects.filter(source=self.source, published__year=self_year) - filtered_media = [m for m in filtered_media where m.upload_date is not None] + filtered_media = [m for m in filtered_media if m.upload_date is not None] sorted_media = sorted(filtered_media, key=lambda x: (x.upload_date, x.key)) position_counter = 1 for media in sorted_media: