* prepare production db for preview URLS, and save jam_track after setting duration in the sync task
This commit is contained in:
parent
67c9f5d891
commit
49ef08ff5d
|
|
@ -1,4 +1,11 @@
|
|||
ALTER TABLE jam_track_tracks ADD COLUMN preview_mp3_url VARCHAR;
|
||||
ALTER TABLE jam_track_tracks ADD COLUMN preview_mp3_md5 VARCHAR;
|
||||
ALTER TABLE jam_track_tracks ADD COLUMN preview_mp3_length BIGINT;
|
||||
UPDATE jam_track_tracks SET preview_url = NULL where track_type = 'Master';
|
||||
DO $$
|
||||
BEGIN
|
||||
BEGIN
|
||||
ALTER TABLE jam_track_tracks ADD COLUMN preview_mp3_url VARCHAR;
|
||||
ALTER TABLE jam_track_tracks ADD COLUMN preview_mp3_md5 VARCHAR;
|
||||
ALTER TABLE jam_track_tracks ADD COLUMN preview_mp3_length BIGINT;
|
||||
EXCEPTION
|
||||
WHEN duplicate_column THEN RAISE NOTICE 'preview mp3 columns already exist in jam_tracks';
|
||||
END;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
|
@ -544,6 +544,7 @@ module JamRuby
|
|||
track["length_48"] = File.new(ogg_48000).size
|
||||
|
||||
synchronize_duration(jam_track, ogg_44100)
|
||||
jam_track.save!
|
||||
|
||||
# convert entire master ogg file to mp3, and push both to public destination
|
||||
if track.track_type == 'Master'
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ module JamRuby
|
|||
# how long did the JamTrack play? not needed because we limit on the input tracks, which represents how long the recording is, too
|
||||
jam_track_play_time = recording_timeline_data["jam_track_play_time"]
|
||||
|
||||
if jam_track_recording_start_play_offset < 0 && jam_track_isplaying
|
||||
if jam_track_recording_start_play_offset < 0
|
||||
# we don't know how to handle this ! alert ops
|
||||
AdminMailer.alerts({subject: "negative jam_track_recording_start_play_offset mix.id=#{self.id}"})
|
||||
jam_track_recording_start_play_offset = 0
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ describe JamTrackImporter do
|
|||
jam_track.original_artist.should eq('Artist 1')
|
||||
jam_track.songwriter.should be_nil
|
||||
jam_track.publisher.should be_nil
|
||||
jam_track.sales_region.should eq('United States')
|
||||
jam_track.sales_region.should eq('Worldwide')
|
||||
jam_track.price.should eq(1.99)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue