|
${parameters['server_name']}
${parameters['start_date']} - ${parameters['end_date']}
|
% if recently_added.get('movie'):
Recently Added Movies
${len(recently_added['movie'])} movie${'s' if len(recently_added['movie']) > 1 else ''}
% for movie in recently_added['movie']:
<%
if loop.index == len(recently_added['movie'])-1 and loop.index % 2 == 0:
clear = ''
odd = 'odd'
else:
clear = odd = ''
%>
${clear | n}
% endfor
% endif
% if recently_added.get('show'):
Recently Added TV Shows
${len(recently_added['show'])} show${'s' if len(recently_added['show']) > 1 else ''} /
<% total_episodes = sum(season['episode_count'] for show in recently_added['show'] for season in show['season']) %>
${total_episodes} episode${'s' if total > 1 else ''}
% for show in recently_added['show']:
<%
if show['season_count'] == 1 and show['season'][0]['episode_count'] == 1:
link_rating_key = show['season'][0]['episode'][0]['rating_key']
link_title = show['title'] + " - " + show['season'][0]['episode'][0]['title']
else:
link_rating_key = show['rating_key']
link_title = show['title']
if loop.index == len(recently_added['show'])-1 and loop.index % 2 == 0:
clear = ''
odd = 'odd'
else:
clear = odd = ''
%>
${clear | n}
% endfor
% endif
% if recently_added.get('artist'):
Recently Added Music
${len(recently_added['artist'])} artist${'s' if len(recently_added['artist']) > 1 else ''} /
<% total_albums = sum(artist['album_count'] for artist in recently_added['artist']) %>
${total_albums} album${'s' if total > 1 else ''}
<% album_count = 0 %>
% for artist in recently_added['artist']:
% for album in artist['album']:
<%
album_count += 1
if album_count == total_albums and album_count % 2 == 1:
clear = ''
odd = 'odd'
else:
clear = odd = ''
%>
${clear | n}
% endfor
% endfor
% endif
|
Recently Added Movies
Recently Added TV Shows
Recently Added Music