Update to homepage statistics

* Added most popular movie to homepage
* New setting to toggle statistics based on play duration instead of
play count
This commit is contained in:
JonnyWong16 2015-08-18 12:32:41 -07:00
commit 5c94b21bd1
6 changed files with 153 additions and 26 deletions

View file

@ -45,12 +45,12 @@
<script src="interfaces/default/js/moment-with-locale.js"></script>
<script>
function getHomeStats(days) {
function getHomeStats(days, plays) {
$.ajax({
url: 'home_stats',
cache: false,
async: true,
data: {time_range: days},
data: {time_range: days, stat_type: plays},
complete: function(xhr, status) {
$("#home-stats").html(xhr.responseText);
}
@ -110,7 +110,7 @@
});
});
getHomeStats(${config['home_stats_length']});
getHomeStats(${config['home_stats_length']}, ${config['home_stats_type']});
</script>