diff --git a/ruby/lib/jam_ruby/models/recorded_video.rb b/ruby/lib/jam_ruby/models/recorded_video.rb index fc787d20a..42f40ea9c 100644 --- a/ruby/lib/jam_ruby/models/recorded_video.rb +++ b/ruby/lib/jam_ruby/models/recorded_video.rb @@ -6,6 +6,10 @@ module JamRuby validates :client_video_source_id, :presence => true + def upload_sign(content_md5) + + end + def self.create_from_video_source(video_source, recording) recorded_video_source = self.new recorded_video_source.recording = recording diff --git a/ruby/lib/jam_ruby/models/recording.rb b/ruby/lib/jam_ruby/models/recording.rb index 12e6ca119..1d9c6fd9c 100644 --- a/ruby/lib/jam_ruby/models/recording.rb +++ b/ruby/lib/jam_ruby/models/recording.rb @@ -181,7 +181,7 @@ module JamRuby # Called when a user wants to "claim" a recording. To do this, the user must have been one of the tracks in the recording. def claim(user, name, description, genre, is_public, upload_to_youtube=false) - + upload_to_youtube = !!upload_to_youtube # Correct where nil is borking save unless self.users.exists?(user) raise PermissionError, "user was not in this session" end @@ -306,7 +306,7 @@ module JamRuby uploads = [] # Uploads now include videos in addition to the tracks. - # This is accomplished using a SQL union via arel, as follows: + # This is accomplished using a SQL UNION query via arel, as follows: # Select fields from track. Note the reorder, which removes # the default scope sort as it b0rks the union. Also note the @@ -357,7 +357,7 @@ module JamRuby # Further joining and criteria for the unioned object: arel = arel.joins("INNER JOIN (SELECT id as rec_id, all_discarded, duration FROM recordings) recs ON rec_id=recorded_items.recording_id") \ .where('recorded_items.user_id' => user.id) \ - .where('recorded_items.fully_uploaded =?', false) \ + .where('recorded_items.fully_uploaded = ?', false) \ .where('recorded_items.id > ?', since) \ .where("upload_failures <= #{APP_CONFIG.max_track_upload_failures}") \ .where("duration IS NOT NULL") \