Commit 2a644f9c authored by Stan Hu's avatar Stan Hu

Merge branch 'sh-fix-chat-and-transcripts' into 'master'

Fix chat and transcript logs

See merge request !17
parents 107e28ff dfe507d4
......@@ -180,7 +180,9 @@ class GoogleDriveClient
uploaded = dest_folder.upload_from_file(filename)
# Google Drive will convert a .txt to a Google Docs file and strip
# the extension, which makes it hard to check for dupliates.
uploaded = dest_folder.upload_from_file(filename, nil, convert: false)
rescue Google::Apis::ServerError => e
puts "Google API error: #{e}"
return false
......@@ -322,7 +324,10 @@ class ZoomSyncher
# Discard any audio or videos that aren't longer than 30 seconds
def should_upload?(filename, file_type)
return true if file_type.downcase == 'chat'
file_type = file_type.downcase
return true if %w[chat transcript].include?(file_type)
return false if file_type == 'timeline'
duration = MediaInfo.from(filename)&.audio&.duration
......@@ -361,6 +366,7 @@ class ZoomSyncher
file_type = file_type.downcase
return 'txt' if file_type == 'chat'
return 'transcript.txt' if file_type == 'transcript'
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