From 915acb81690f5c653c572682f0af60b9099973f9 Mon Sep 17 00:00:00 2001 From: gugat Date: Fri, 29 Jul 2011 02:02:43 -0500 Subject: [PATCH] Overwrite eql? in AudioRecordingEvent class and use uniq! in the array start_events in the method start_audio_recording_events --- .../core/lib/recordandplayback/generators/audio.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/record-and-playback/core/lib/recordandplayback/generators/audio.rb b/record-and-playback/core/lib/recordandplayback/generators/audio.rb index d06f833efa..fec4ef283a 100755 --- a/record-and-playback/core/lib/recordandplayback/generators/audio.rb +++ b/record-and-playback/core/lib/recordandplayback/generators/audio.rb @@ -136,6 +136,7 @@ module BigBlueButton ae.start_record_timestamp = start_event.xpath(RECORD_TIMESTAMP).text start_events << ae end + start_events.uniq! return start_events.sort {|a,b| a.start_event_timestamp <=> b.start_event_timestamp} end @@ -260,6 +261,11 @@ module BigBlueButton "[startEvent=#{start_event_timestamp}, startRecord=#{start_record_timestamp}, stopRecord=#{stop_record_timestamp}, stopEvent=#{stop_event_timestamp}, " + "brige=#{bridge}, file=#{file}, exist=#{file_exist}, padding=#{padding}]\n" end + + def eql?(other) + start_record_timestamp == other.start_record_timestamp + end + end end