Skip to content

Commit

Permalink
update changed recording URLs of already present formats instead of c…
Browse files Browse the repository at this point in the history
…reating new format entries (bigbluebutton#5460)
  • Loading branch information
Ithanil authored Oct 12, 2023
1 parent 76dffcd commit d43119c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/services/recording_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ def get_recording_length(recording:)
def create_formats(recording:, new_recording:)
if recording[:playback][:format].is_a?(Array)
recording[:playback][:format].each do |format|
Format.find_or_create_by(recording_id: new_recording.id, recording_type: format[:type], url: format[:url])
Format.find_or_create_by(recording_id: new_recording.id, recording_type: format[:type]).update(url: format[:url])
end
else
Format.find_or_create_by(recording_id: new_recording.id, recording_type: recording[:playback][:format][:type],
url: recording[:playback][:format][:url])
Format.find_or_create_by(recording_id: new_recording.id,
recording_type: recording[:playback][:format][:type]).update(url: recording[:playback][:format][:url])
end
end

Expand Down

0 comments on commit d43119c

Please sign in to comment.