Skip to content
Snippets Groups Projects
Commit a6fc8f0f authored by Joshua Arts's avatar Joshua Arts
Browse files

fix stats format being removed

parent a27fbec4
Branches
Tags
No related merge requests found
......@@ -132,10 +132,10 @@ class RoomsController < ApplicationController
# Helper for converting BigBlueButton dates into a nice length string.
def recording_length(playbacks)
# Stats format currently doesn't support length.
playbacks.reject! { |p| p[:type] == "statistics" }
return "0 min" if playbacks.empty?
valid_playbacks = playbacks.reject { |p| p[:type] == "statistics" }
return "0 min" if valid_playbacks.empty?
len = playbacks.first[:length]
len = valid_playbacks.first[:length]
if len > 60
"#{(len / 60).round} hrs"
elsif len == 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment