diff --git a/app/assets/javascripts/recordings.coffee b/app/assets/javascripts/recordings.coffee index d56a69f3..92c9b5a9 100644 --- a/app/assets/javascripts/recordings.coffee +++ b/app/assets/javascripts/recordings.coffee @@ -249,7 +249,7 @@ class @Recordings url: url+'/'+id, data: data }).done((data) -> - + btn.prop('disabled', false) ).fail((data) -> btn.prop('disabled', false) ) @@ -264,7 +264,7 @@ class @Recordings method: 'DELETE', url: url+'/'+id }).done((data) -> - + btn.prop('disabled', false) ).fail((data) -> btn.prop('disabled', false) ) diff --git a/app/controllers/bbb_controller.rb b/app/controllers/bbb_controller.rb index 0108b4f0..6f8735c4 100644 --- a/app/controllers/bbb_controller.rb +++ b/app/controllers/bbb_controller.rb @@ -159,9 +159,10 @@ class BbbController < ApplicationController # DELETE /rooms/:id/recordings/:record_id # DELETE /rooms/:room_id/:id/recordings/:record_id def delete_recordings + recording = bbb_get_recordings({recordID: params[:record_id]})[:recordings].first bbb_res = bbb_delete_recordings(params[:record_id]) if bbb_res[:returncode] - RecordingDeletesJob.perform_later(@user.encrypted_id, params[:record_id], params[:id]) + RecordingDeletesJob.perform_later(@user.encrypted_id, params[:record_id], recording[:metadata][:"meeting-name"]) end render_bbb_response bbb_res end diff --git a/app/jobs/recording_deletes_job.rb b/app/jobs/recording_deletes_job.rb index 10a144e3..79217fd9 100644 --- a/app/jobs/recording_deletes_job.rb +++ b/app/jobs/recording_deletes_job.rb @@ -20,25 +20,12 @@ class RecordingDeletesJob < ApplicationJob queue_as :default def perform(room, record_id, meeting=nil) - tries = 0 - sleep_time = 2 - - while tries < 4 - bbb_res = bbb_get_recordings({recordID: record_id}) - if !bbb_res[:recordings] || bbb_res[:messageKey] == 'noRecordings' - full_id = room - full_id += "-#{recording[:metadata][:"meeting-name"]}" - ActionCable.server.broadcast "#{room}_recording_updates_channel", - action: 'delete', - id: record_id - ActionCable.server.broadcast "#{full_id}_recording_updates_channel", - action: 'delete', - id: record_id - break - end - sleep sleep_time - sleep_time = sleep_time * 2 - tries += 1 - end + full_id = "#{room}-#{meeting}" + ActionCable.server.broadcast "#{room}_recording_updates_channel", + action: 'delete', + id: record_id + ActionCable.server.broadcast "#{full_id}_recording_updates_channel", + action: 'delete', + id: record_id end end diff --git a/config/locales/en-us.yml b/config/locales/en-us.yml index 4bb3fa33..188dc2f8 100644 --- a/config/locales/en-us.yml +++ b/config/locales/en-us.yml @@ -104,7 +104,7 @@ en-US: moderator_default_message: Invitation link - %{url} my_room: my room name: Name - no: No + 'no': 'No' notification_mailer: recording_ready_email: closing: "Regards,... BigBlueButton" @@ -143,4 +143,4 @@ en-US: wait_for_mod_msg: Looks like you're the first one here... wait_for_mod_explanation: You will automatically join when the meeting starts watch: Watch - yes: Yes + 'yes': 'Yes'