Fix sorting episodes in newsletter with missing season number

This commit is contained in:
JonnyWong16 2021-04-05 12:19:21 -07:00
commit e6c193772c
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -754,7 +754,7 @@ class RecentlyAdded(Newsletter):
children = pms_connect.get_item_children(show_rating_key, get_grandchildren=True)
filtered_children = [i for i in children['children_list']
if self.start_time < helpers.cast_to_int(i['added_at']) < self.end_time]
filtered_children.sort(key=lambda x: int(x['parent_media_index']))
filtered_children.sort(key=lambda x: helpers.cast_to_int(x['parent_media_index']))
seasons = []
for (index, title), children in groupby(filtered_children,