${loop.index + 1}
% if stat_id in ('top_movies', 'popular_movies', 'top_tv', 'popular_tv', 'top_music', 'popular_music', 'last_watched'):
@@ -138,9 +149,9 @@ DOCUMENTATION :: END
% endif
- % if top_stat.get('stat_type') == 'total_plays':
+ % if stat_id.startswith('top') and top_stat.get('stat_type') == 'total_plays':
${row['total_plays']}
- % elif top_stat.get('stat_type') == 'total_duration':
+ % elif stat_id.startswith('top') and top_stat.get('stat_type') == 'total_duration':
${row['total_duration'] | hd}
% elif stat_id.startswith('popular'):
${row['users_watched']}
@@ -166,7 +177,7 @@ DOCUMENTATION :: END
var stat_id = $(elem).data('stat_id');
var art = $(elem).data('art');
var thumb = $(elem).data('thumb');
- var [height, fallback] = ($.inArray(stat_id, ['top_music', 'popular_music'])) ? [450, 'poster'] : [300, 'cover'];
+ var [height, fallback] = ($.inArray(stat_id, ['top_music', 'popular_music']) > -1) ? [300, 'cover'] : [450, 'poster'];
if (stat_id == 'most_concurrent') {
return
@@ -190,9 +201,22 @@ DOCUMENTATION :: END
$('.dashboard-stats-info-item').mouseenter(function () {
changeImages(this)
+ if ($(this).data('stat_id') == 'last_watched') {
+ var friendly_name = $(this).data('friendly_name');
+ var last_watch = moment($(this).data('last_watch'), 'X').format(date_format);
+ $('#last-watched-header-info').html(friendly_name);
+ } else if ($(this).data('stat_id') == 'most_concurrent') {
+ var started = moment($(this).data('started'), 'X').format(date_format + ' ' + time_format);
+ $('#most-concurrent-header-info').html(started);
+ }
});
$('.dashboard-stats-instance').mouseleave(function () {
changeImages($(this).find('.dashboard-stats-info-item').first())
+ if ($(this).data('stat_id') == 'last_watched') {
+ $('#last-watched-header-info').text($(this).find('.dashboard-stats-info-item').first().data('friendly_name'));
+ } else if ($(this).data('stat_id') == 'most_concurrent') {
+ $('#most-concurrent-header-info').text('streams');
+ }
});
% else:
diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html
index fb470173..71eb80d4 100644
--- a/data/interfaces/default/index.html
+++ b/data/interfaces/default/index.html
@@ -489,8 +489,8 @@
data: session,
complete: function(xhr, status) {
$('#currentActivity').append(xhr.responseText);
- $('#instance-' + session.session_key + ' .dashboard-activity-info-scroller').scrollbar();
- $('#instance-' + session.session_key + ' [data-toggle=tooltip]').tooltip({ container: 'body', placement: 'right', delay: 50 })
+ $('#activity-instance-' + session.session_key + ' .dashboard-activity-info-scroller').scrollbar();
+ $('#activity-instance-' + session.session_key + ' [data-toggle=tooltip]').tooltip({ container: 'body', placement: 'right', delay: 50 })
$('#terminate-button-' + session.session_key).tooltip('destroy').tooltip({ container: 'body', placement: 'left', delay: 50 });
}
});
diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py
index 86f9618f..b5f502dd 100644
--- a/plexpy/datafactory.py
+++ b/plexpy/datafactory.py
@@ -738,7 +738,7 @@ class DataFactory(object):
last_watched.append(row)
home_stats.append({'stat_id': stat,
- 'stat_title': 'Last Watched Items',
+ 'stat_title': 'Recently Watched',
'rows': session.mask_session_info(last_watched)})
elif stat == 'most_concurrent':