diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/json/PlayerJSONCreator.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/json/PlayerJSONCreator.java index 542ab362b..7a6deae4d 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/json/PlayerJSONCreator.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/json/PlayerJSONCreator.java @@ -138,6 +138,7 @@ public class PlayerJSONCreator { onlineActivity.put("active_playtime_30d", timeAmount.apply(sessions30d.toActivePlaytime())); onlineActivity.put("afk_time_30d", timeAmount.apply(sessions30d.toAfkTime())); onlineActivity.put("average_session_length_30d", timeAmount.apply(sessions30d.toAverageSessionLength())); + onlineActivity.put("median_session_length_30d", timeAmount.apply(sessions30d.toMedianSessionLength())); onlineActivity.put("session_count_30d", sessions30d.count()); onlineActivity.put("player_kill_count_30d", sessions30d.toPlayerKillCount()); onlineActivity.put("mob_kill_count_30d", sessions30d.toMobKillCount()); @@ -147,6 +148,7 @@ public class PlayerJSONCreator { onlineActivity.put("active_playtime_7d", timeAmount.apply(sessions7d.toActivePlaytime())); onlineActivity.put("afk_time_7d", timeAmount.apply(sessions7d.toAfkTime())); onlineActivity.put("average_session_length_7d", timeAmount.apply(sessions7d.toAverageSessionLength())); + onlineActivity.put("median_session_length_7d", timeAmount.apply(sessions7d.toMedianSessionLength())); onlineActivity.put("session_count_7d", sessions7d.count()); onlineActivity.put("player_kill_count_7d", sessions7d.toPlayerKillCount()); onlineActivity.put("mob_kill_count_7d", sessions7d.toMobKillCount()); diff --git a/Plan/common/src/main/resources/assets/plan/web/js/player-values.js b/Plan/common/src/main/resources/assets/plan/web/js/player-values.js index 572d8f933..79dc83bb1 100644 --- a/Plan/common/src/main/resources/assets/plan/web/js/player-values.js +++ b/Plan/common/src/main/resources/assets/plan/web/js/player-values.js @@ -51,8 +51,8 @@ function loadPlayerOverviewValues(json, error) { $(element).find("#data_active_playtime_7d").text(data.active_playtime_7d); $(element).find("#data_afk_time_30d").text(data.afk_time_30d); $(element).find("#data_afk_time_7d").text(data.afk_time_7d); - $(element).find("#data_average_session_length_30d").text(data.average_session_length_30d); - $(element).find("#data_average_session_length_7d").text(data.average_session_length_7d); + $(element).find("#data_median_session_length_30d").text(data.median_session_length_30d); + $(element).find("#data_median_session_length_7d").text(data.median_session_length_7d); $(element).find("#data_session_count_30d").text(data.session_count_30d); $(element).find("#data_session_count_7d").text(data.session_count_7d); $(element).find("#data_player_kills_30d").text(data.player_kill_count_30d); diff --git a/Plan/common/src/main/resources/assets/plan/web/player.html b/Plan/common/src/main/resources/assets/plan/web/player.html index 2974023b4..38311e6e7 100644 --- a/Plan/common/src/main/resources/assets/plan/web/player.html +++ b/Plan/common/src/main/resources/assets/plan/web/player.html @@ -285,8 +285,8 @@ Average Session Length - - + + Sessions