Commit 73d20e3f authored by Stan Hu's avatar Stan Hu

Merge branch 'leipert-event-date' into 'master'

Include event date in folder structure

See merge request !19
parents dcc2c24f dc21eea5
......@@ -274,7 +274,7 @@ class ZoomSyncher
end
ext = file_extension(file_type)
folder = subfolder(email, topic, file_type)
folder = subfolder(email, topic, event_date, file_type)
filename = sanitize_filename("#{topic}-#{event_date}-#{uuid}-#{index}") + ".#{ext}"
video_url = file['download_url'] + "?access_token=#{client.access_token}"
file_size = file['file_size']
......@@ -370,11 +370,11 @@ class ZoomSyncher
end
end
def subfolder(prefix, topic, file_type)
def subfolder(prefix, topic, event_date, file_type)
base_name = "#{prefix}-#{topic}"
return [base_name, 'audio'] if file_type.casecmp('m4a').zero?
return [base_name, event_date, 'audio'] if file_type.casecmp('m4a').zero?
[base_name]
[base_name, event_date]
end
def file_extension(file_type)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment