* merge
This commit is contained in:
parent
1da8cfd4a1
commit
184bf2ba4d
|
|
@ -29,6 +29,7 @@ module JamRuby
|
|||
end
|
||||
|
||||
def finish(reason, detail)
|
||||
@@log.info("JamTrackImporter:#{self.name} #{reason}")
|
||||
self.reason = reason
|
||||
self.detail = detail
|
||||
end
|
||||
|
|
@ -348,6 +349,7 @@ module JamRuby
|
|||
original_artist = parsed_metalocation[1]
|
||||
name = parsed_metalocation[2]
|
||||
|
||||
|
||||
JamTrackImporter.summaries[:unique_artists] << original_artist
|
||||
|
||||
success = dry_run_metadata(metadata, original_artist, name)
|
||||
|
|
@ -386,6 +388,11 @@ module JamRuby
|
|||
@storage_format == 'Tency'
|
||||
end
|
||||
|
||||
def is_tim_tracks_storage?
|
||||
assert_storage_set
|
||||
@storage_format == 'TimTracks'
|
||||
end
|
||||
|
||||
def assert_storage_set
|
||||
raise "no storage_format set" if @storage_format.nil?
|
||||
end
|
||||
|
|
@ -393,7 +400,7 @@ module JamRuby
|
|||
|
||||
def parse_metalocation(metalocation)
|
||||
# metalocation = mapped/4 Non Blondes - What's Up - 6475/meta.yml
|
||||
if is_tency_storage?
|
||||
if is_tency_storage? || is_tim_tracks_storage?
|
||||
|
||||
suffix = '/meta.yml'
|
||||
|
||||
|
|
@ -422,15 +429,20 @@ module JamRuby
|
|||
return nil
|
||||
end
|
||||
|
||||
last_dash = metalocation.rindex('-')
|
||||
if last_dash
|
||||
song = metalocation[(first_dash+3)...last_dash].strip
|
||||
bits << song
|
||||
if is_tim_tracks_storage?
|
||||
song = metalocation[(first_dash+3)..-1].strip
|
||||
else
|
||||
finish("invalid_metalocation", "metalocation not valid #{metalocation}")
|
||||
return nil
|
||||
last_dash = metalocation.rindex('-')
|
||||
if last_dash
|
||||
song = metalocation[(first_dash+3)...last_dash].strip
|
||||
bits << song
|
||||
else
|
||||
finish("invalid_metalocation", "metalocation not valid #{metalocation}")
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
bits << 'meta.yml'
|
||||
bits
|
||||
else
|
||||
|
|
@ -633,6 +645,9 @@ module JamRuby
|
|||
jam_track.vendor_id = metadata[:id]
|
||||
jam_track.licensor = JamTrackLicensor.find_by_name('Tency Music')
|
||||
#add_licensor_metadata('Tency Music', metalocation)
|
||||
elsif is_tim_tracks_storage?
|
||||
jam_track.vendor_id = metadata[:id]
|
||||
jam_track.licensor = JamTrackLicensor.find_by_name('Tim Waurick')
|
||||
end
|
||||
else
|
||||
if !options[:resync_audio]
|
||||
|
|
@ -781,7 +796,7 @@ module JamRuby
|
|||
instrument = 'other'
|
||||
part = 'Bouzouki'
|
||||
elsif potential_instrument == 'claps' || potential_instrument == 'hand claps'
|
||||
instrument = 'computer'
|
||||
instrument = 'other'
|
||||
part = 'Claps'
|
||||
else
|
||||
found_instrument = Instrument.find_by_id(potential_instrument)
|
||||
|
|
@ -891,7 +906,6 @@ module JamRuby
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -1680,6 +1694,8 @@ module JamRuby
|
|||
def song_storage_manager
|
||||
if is_tency_storage?
|
||||
tency_s3_manager
|
||||
elsif is_tim_tracks_storage?
|
||||
tim_tracks_s3_manager
|
||||
else
|
||||
s3_manager
|
||||
end
|
||||
|
|
@ -1693,6 +1709,10 @@ module JamRuby
|
|||
@tency_s3_manager ||= S3Manager.new('jamkazam-tency', APP_CONFIG.aws_access_key_id, APP_CONFIG.aws_secret_access_key)
|
||||
end
|
||||
|
||||
def tim_tracks_s3_manager
|
||||
@tim_tracks_s3_manager ||= S3Manager.new('jamkazam-timtracks', APP_CONFIG.aws_access_key_id, APP_CONFIG.aws_secret_access_key)
|
||||
end
|
||||
|
||||
def s3_manager
|
||||
@s3_manager ||= S3Manager.new(APP_CONFIG.aws_bucket_jamtracks, APP_CONFIG.aws_access_key_id, APP_CONFIG.aws_secret_access_key)
|
||||
end
|
||||
|
|
@ -1731,10 +1751,32 @@ module JamRuby
|
|||
@storage_format == 'Tency'
|
||||
end
|
||||
|
||||
def is_tim_tracks_storage?
|
||||
assert_storage_set
|
||||
@storage_format == 'TimTracks'
|
||||
end
|
||||
|
||||
def assert_storage_set
|
||||
raise "no storage_format set" if @storage_format.nil?
|
||||
end
|
||||
|
||||
def iterate_tim_tracks_song_storage(&blk)
|
||||
count = 0
|
||||
song_storage_manager.list_directories('mapped').each do |song|
|
||||
@@log.debug("searching through song directory '#{song}'")
|
||||
|
||||
metalocation = "#{song}meta.yml"
|
||||
|
||||
metadata = load_metalocation(metalocation)
|
||||
|
||||
blk.call(metadata, metalocation)
|
||||
|
||||
count += 1
|
||||
#break if count > 100
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
def iterate_tency_song_storage(&blk)
|
||||
count = 0
|
||||
song_storage_manager.list_directories('mapped').each do |song|
|
||||
|
|
@ -1774,6 +1816,10 @@ module JamRuby
|
|||
iterate_tency_song_storage do |metadata, metalocation|
|
||||
blk.call(metadata, metalocation)
|
||||
end
|
||||
elsif is_tim_tracks_storage?
|
||||
iterate_tim_tracks_song_storage do |metadata, metalocation|
|
||||
blk.call(metadata, metalocation)
|
||||
end
|
||||
else
|
||||
iterate_default_song_storage do |metadata, metalocation|
|
||||
blk.call(metadata, metalocation)
|
||||
|
|
|
|||
|
|
@ -137,6 +137,9 @@
|
|||
else if(type === ALERT_NAMES.VIDEO_WINDOW_CLOSED) {
|
||||
context.VideoActions.videoWindowClosed()
|
||||
}
|
||||
else if (type === ALERT_NAMES.VST_CHANGED) {
|
||||
context.ConfigureTracksActions.onVstChanged()
|
||||
}
|
||||
else if((!context.JK.CurrentSessionModel || !context.JK.CurrentSessionModel.inSession()) &&
|
||||
(ALERT_NAMES.INPUT_IO_RATE == type || ALERT_NAMES.INPUT_IO_JTR == type || ALERT_NAMES.OUTPUT_IO_RATE == type || ALERT_NAMES.OUTPUT_IO_JTR== type)) {
|
||||
// squelch these events if not in session
|
||||
|
|
|
|||
|
|
@ -126,7 +126,8 @@
|
|||
RECORDING_DONE :48, //the recording writer thread is done
|
||||
VIDEO_WINDOW_OPENED :49, //video window opened
|
||||
VIDEO_WINDOW_CLOSED :50,
|
||||
LAST_ALERT : 51
|
||||
VST_CHANGED: 51, // VST state changed
|
||||
LAST_ALERT : 52
|
||||
}
|
||||
// recreate eThresholdType enum from MixerDialog.h
|
||||
context.JK.ALERT_TYPES = {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
context = window
|
||||
|
||||
@ConfigureTracksActions = Reflux.createActions({
|
||||
reset: {}
|
||||
trySave: {}
|
||||
midiScan: {}
|
||||
vstScan: {}
|
||||
vstScanComplete: {}
|
||||
clearVsts: {}
|
||||
cancelEdit: {}
|
||||
deleteTrack: {}
|
||||
updateOutputs: {}
|
||||
showAddNewTrack: {}
|
||||
showEditTrack: {}
|
||||
showEditOutputs: {}
|
||||
showVstSettings: {}
|
||||
associateInputsWithTrack: {}
|
||||
associateInstrumentWithTrack: {}
|
||||
associateVSTWithTrack: {}
|
||||
associateMIDIWithTrack: {}
|
||||
desiredTrackType: {}
|
||||
})
|
||||
|
|
@ -14,6 +14,11 @@ namespace :jam_tracks do
|
|||
JamTrackImporter.dry_run
|
||||
end
|
||||
|
||||
task timtracks_dry_run: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'TimTracks'
|
||||
JamTrackImporter.dry_run
|
||||
end
|
||||
|
||||
task tency_create_masters: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'Tency'
|
||||
JamTrackImporter.create_masters
|
||||
|
|
@ -80,6 +85,11 @@ namespace :jam_tracks do
|
|||
JamTrackImporter.synchronize_all(skip_audio_upload:false)
|
||||
end
|
||||
|
||||
task sync_tim_tracks: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'TimTracks'
|
||||
JamTrackImporter.synchronize_all(skip_audio_upload:false)
|
||||
end
|
||||
|
||||
task tency_dups: :environment do |task, args|
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue