From e90390be6776772446698639b3ea3559884dbab3 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 20 Jan 2020 20:08:45 -0800 Subject: [PATCH] Fix plural episodes and albums in newsletter templates (Fixes Tautulli/Tautulli-Issues#203) --- data/interfaces/newsletters/recently_added.html | 4 ++-- data/interfaces/newsletters/recently_added.internal.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/interfaces/newsletters/recently_added.html b/data/interfaces/newsletters/recently_added.html index c6f5fba1..f16e2c15 100644 --- a/data/interfaces/newsletters/recently_added.html +++ b/data/interfaces/newsletters/recently_added.html @@ -694,7 +694,7 @@
${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 ''} + ${total_episodes} episode${'s' if total_episodes > 1 else ''}
@@ -847,7 +847,7 @@
${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 ''} + ${total_albums} album${'s' if total_albums > 1 else ''}
diff --git a/data/interfaces/newsletters/recently_added.internal.html b/data/interfaces/newsletters/recently_added.internal.html index 198ba49e..96e3e82e 100644 --- a/data/interfaces/newsletters/recently_added.internal.html +++ b/data/interfaces/newsletters/recently_added.internal.html @@ -694,7 +694,7 @@
${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 ''} + ${total_episodes} episode${'s' if total_episodes > 1 else ''}
@@ -847,7 +847,7 @@
${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 ''} + ${total_albums} album${'s' if total_albums > 1 else ''}