mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-22 06:13:25 -07:00
newsletter implementation
This commit is contained in:
parent
58f2e81a7b
commit
77bd6129a8
1 changed files with 11 additions and 2 deletions
|
@ -766,9 +766,17 @@ class RecentlyAdded(Newsletter):
|
|||
for (index, title), children in groupby(filtered_children,
|
||||
key=lambda x: (x['parent_media_index'], x['parent_title'])):
|
||||
episodes = list(children)
|
||||
#TODO How do we want to display the episode range in the newsletter
|
||||
|
||||
num, num00 = format_group_index([helpers.cast_to_int(d['media_index']) for d in episodes])
|
||||
isDateBased = True
|
||||
for e in episodes:
|
||||
if e['media_index']:
|
||||
isDateBased = False
|
||||
break
|
||||
|
||||
if isDateBased:
|
||||
num00 = helpers.format_date_based_show(episodes[0]['originally_available_at']) + " - " + helpers.format_date_based_show(episodes[len(episodes)-1]['originally_available_at'])
|
||||
else:
|
||||
num, num00 = format_group_index([helpers.cast_to_int(d['media_index']) for d in episodes])
|
||||
|
||||
seasons.append({'media_index': index,
|
||||
'title': title,
|
||||
|
@ -786,6 +794,7 @@ class RecentlyAdded(Newsletter):
|
|||
show_rating_keys.append(show_rating_key)
|
||||
|
||||
recently_added = shows_list
|
||||
logger.info(recently_added)
|
||||
|
||||
if media_type == 'artist':
|
||||
artists_list = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue