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