mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Ignore items with future added at dates in newsletter
This commit is contained in:
parent
abdde65c2e
commit
07ccd2af96
1 changed files with 9 additions and 2 deletions
|
@ -713,7 +713,7 @@ class RecentlyAdded(Newsletter):
|
|||
while not done:
|
||||
recent_items = pms_connect.get_recently_added_details(start=str(start), count='10', media_type=media_type)
|
||||
filtered_items = [i for i in recent_items['recently_added']
|
||||
if self.start_time < helpers.cast_to_int(i['added_at']) < self.end_time]
|
||||
if self.start_time < helpers.cast_to_int(i['added_at'])]
|
||||
if len(filtered_items) < 10:
|
||||
done = True
|
||||
else:
|
||||
|
@ -728,7 +728,8 @@ class RecentlyAdded(Newsletter):
|
|||
if item['section_id'] not in self.config['incl_libraries']:
|
||||
continue
|
||||
|
||||
movie_list.append(item)
|
||||
if self.start_time < helpers.cast_to_int(item['added_at']) < self.end_time:
|
||||
movie_list.append(item)
|
||||
|
||||
recently_added = movie_list
|
||||
|
||||
|
@ -756,6 +757,9 @@ class RecentlyAdded(Newsletter):
|
|||
if self.start_time < helpers.cast_to_int(i['added_at']) < self.end_time]
|
||||
filtered_children.sort(key=lambda x: helpers.cast_to_int(x['parent_media_index']))
|
||||
|
||||
if not filtered_children:
|
||||
continue
|
||||
|
||||
seasons = []
|
||||
for (index, title), children in groupby(filtered_children,
|
||||
key=lambda x: (x['parent_media_index'], x['parent_title'])):
|
||||
|
@ -803,6 +807,9 @@ class RecentlyAdded(Newsletter):
|
|||
if self.start_time < helpers.cast_to_int(i['added_at']) < self.end_time]
|
||||
filtered_children.sort(key=lambda x: x['added_at'])
|
||||
|
||||
if not filtered_children:
|
||||
continue
|
||||
|
||||
albums = []
|
||||
for a in filtered_children:
|
||||
album_metadata = pms_connect.get_metadata_details(a['rating_key'], media_info=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue