diff --git a/data/interfaces/default/home_stats.html b/data/interfaces/default/home_stats.html index f274ab0a..abad7504 100644 --- a/data/interfaces/default/home_stats.html +++ b/data/interfaces/default/home_stats.html @@ -89,18 +89,23 @@ DOCUMENTATION :: END
% endif <% - height, type = ('450', 'poster') + height, fallback = ('450', 'poster') if stat_id in ('top_music', 'popular_music'): - height, type = ('300', 'cover') + height, fallback = ('300', 'cover') elif row0['live']: - height, type = ('450', 'poster-live') + height, fallback = ('450', 'poster-live') + + href = '#' + if row0['rating_key']: + href = 'info?rating_key={}'.format(row0['rating_key']) + if row0['live']: + href += '&source=history' %> - <% href = 'info?rating_key={}'.format(row0['rating_key']) if row0['rating_key'] else '#' %> % if row0['thumb']: -
+
% else: -
+
% endif
@@ -140,7 +145,13 @@ DOCUMENTATION :: END
${loop.index + 1}
% if stat_id in ('top_movies', 'popular_movies', 'top_tv', 'popular_tv', 'top_music', 'popular_music', 'last_watched'): - <% href = 'info?rating_key={}'.format(row['rating_key']) if row['rating_key'] else '#' %> + <% + href = '#' + if row['rating_key']: + href = 'info?rating_key={}'.format(row['rating_key']) + if row0['live']: + href += '&source=history' + %> ${row['title']} @@ -194,7 +205,7 @@ DOCUMENTATION :: END } else if (live) { [height, fallback_poster, fallback_art] = [450, 'poster-live', 'art-live']; } - var href; + var href = '#'; if (stat_id === 'most_concurrent') { return @@ -202,8 +213,6 @@ DOCUMENTATION :: END $('#stats-thumb-' + stat_id).css('background-image', 'url(' + (user_thumb || 'images/gravatar-default.png') + ')'); if (user_id) { href = 'user?user_id=' + user_id; - } else { - href = '#'; } $('#stats-thumb-url-' + stat_id).attr('href', href).prop('title', $(elem).data('friendly_name')); } else if (stat_id === 'top_platforms') { @@ -216,8 +225,9 @@ DOCUMENTATION :: END } else { if (rating_key) { href = 'info?rating_key=' + rating_key; - } else { - href = '#'; + if (live) { + href += '&source=history'; + } } $('#stats-thumb-url-' + stat_id).attr('href', href).prop('title', $(elem).data('title')); if (art) {