clevie tracks and fix for detecting some sort of open window
This commit is contained in:
parent
a1fd8c3d10
commit
f4ee0be3b7
|
|
@ -33,6 +33,7 @@ ActiveAdmin.register_page "Fake Purchaser" do
|
|||
jam_track_right.jam_track = jam_track
|
||||
jam_track_right.is_test_purchase = true
|
||||
jam_track_right.version = jam_track.version
|
||||
jam_track_right.can_download = true
|
||||
jam_track_right.save!
|
||||
count = count + 1
|
||||
end
|
||||
|
|
|
|||
|
|
@ -527,6 +527,12 @@ module JamRuby
|
|||
@storage_format == 'Drumma'
|
||||
end
|
||||
|
||||
def is_clevie_storage?
|
||||
assert_storage_set
|
||||
@storage_format == 'Clevie'
|
||||
end
|
||||
|
||||
|
||||
def assert_storage_set
|
||||
raise "no storage_format set" if @storage_format.nil?
|
||||
end
|
||||
|
|
@ -534,7 +540,7 @@ module JamRuby
|
|||
|
||||
def parse_metalocation(metalocation)
|
||||
# metalocation = mapped/4 Non Blondes - What's Up - 6475/meta.yml
|
||||
if is_drumma_storage?
|
||||
if is_drumma_storage? || is_clevie_storage?
|
||||
|
||||
suffix = '/meta.yml'
|
||||
|
||||
|
|
@ -898,6 +904,9 @@ module JamRuby
|
|||
elsif is_drumma_storage?
|
||||
jam_track.vendor_id = metadata[:id]
|
||||
jam_track.licensor = JamTrackLicensor.find_by_name!('Drumma Boy')
|
||||
elsif is_clevie_storage?
|
||||
jam_track.vendor_id = metadata[:id]
|
||||
jam_track.licensor = JamTrackLicensor.find_by_name!('Steely & Clevie')
|
||||
end
|
||||
jam_track.slug = metadata['slug']
|
||||
if jam_track.slug.nil?
|
||||
|
|
@ -2247,6 +2256,8 @@ module JamRuby
|
|||
tim_tracks_s3_manager
|
||||
elsif is_drumma_storage?
|
||||
drumma_s3_manager
|
||||
elsif is_clevie_storage?
|
||||
clevie_s3_manager
|
||||
elsif is_helbing_storage?
|
||||
helbing_s3_manager
|
||||
else
|
||||
|
|
@ -2262,6 +2273,10 @@ module JamRuby
|
|||
@drumma_s3_manager ||= S3Manager.new('jamkazam-drumma', APP_CONFIG.aws_access_key_id, APP_CONFIG.aws_secret_access_key)
|
||||
end
|
||||
|
||||
def clevie_s3_manager
|
||||
@clevie_s3_manager ||= S3Manager.new('jamkazam-clevie', APP_CONFIG.aws_access_key_id, APP_CONFIG.aws_secret_access_key)
|
||||
end
|
||||
|
||||
def tency_s3_manager
|
||||
@tency_s3_manager ||= S3Manager.new('jamkazam-tency', APP_CONFIG.aws_access_key_id, APP_CONFIG.aws_secret_access_key)
|
||||
end
|
||||
|
|
@ -2335,6 +2350,11 @@ module JamRuby
|
|||
@storage_format == 'Drumma'
|
||||
end
|
||||
|
||||
def is_clevie_storage?
|
||||
assert_storage_set
|
||||
@storage_format == 'Clevie'
|
||||
end
|
||||
|
||||
def is_tency_storage?
|
||||
assert_storage_set
|
||||
@storage_format == 'Tency'
|
||||
|
|
@ -2446,6 +2466,19 @@ module JamRuby
|
|||
end
|
||||
end
|
||||
|
||||
def iterate_clevie_song_storage(&blk)
|
||||
song_storage_manager.list_directories.each do |song|
|
||||
@@log.debug("searching through song directory '#{song}'")
|
||||
|
||||
metalocation = "#{song}meta.yml"
|
||||
|
||||
metadata = load_metalocation(metalocation)
|
||||
|
||||
blk.call(metadata, metalocation)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
def iterate_helbing_song_storage(&blk)
|
||||
count = 0
|
||||
song_storage_manager.list_directories('mapped').each do |song|
|
||||
|
|
@ -2479,6 +2512,10 @@ module JamRuby
|
|||
iterate_drumma_song_storage do |metadata, metalocation|
|
||||
blk.call(metadata, metalocation)
|
||||
end
|
||||
elsif is_clevie_storage?
|
||||
iterate_clevie_song_storage do |metadata, metalocation|
|
||||
blk.call(metadata, metalocation)
|
||||
end
|
||||
elsif is_helbing_storage?
|
||||
iterate_helbing_song_storage do |metadata, metalocation|
|
||||
blk.call(metadata, metalocation)
|
||||
|
|
@ -3482,6 +3519,17 @@ module JamRuby
|
|||
meta = YAML.load(data)
|
||||
meta[:genres] = ['r&b'] if !meta[:genres]
|
||||
meta
|
||||
elsif is_clevie_storage?
|
||||
|
||||
data = {}
|
||||
begin
|
||||
data = clevie_s3_manager.read_all(metalocation)
|
||||
rescue AWS::S3::Errors::NoSuchKey
|
||||
return {}
|
||||
end
|
||||
meta = YAML.load(data)
|
||||
meta[:genres] = ['reggae'] if !meta[:genres]
|
||||
meta
|
||||
else
|
||||
begin
|
||||
data = s3_manager.read_all(metalocation)
|
||||
|
|
|
|||
|
|
@ -1752,6 +1752,7 @@
|
|||
this.isSessVideoShared = isSessVideoShared;
|
||||
this.SessStopVideoSharing = SessStopVideoSharing;
|
||||
this.SessStartVideoSharing = SessStartVideoSharing;
|
||||
this.getOpenVideoSources = getOpenVideoSources;
|
||||
|
||||
// Clipboard
|
||||
this.SaveToClipboard = SaveToClipboard;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,10 @@ if accessOpener
|
|||
|
||||
|
||||
# if the video window isn't open, but a video option was selected...
|
||||
if recordVideo != NoVideoRecordActive && !VideoStore.videoShared
|
||||
window.opener.VideoActions.refreshVideoState.trigger()
|
||||
|
||||
if recordVideo != NoVideoRecordActive && !VideoStore.anyVideoOpen
|
||||
#if recordVideo != NoVideoRecordActive && !VideoStore.videoShared
|
||||
logger.debug("prevent video from opening", VideoStore)
|
||||
context.JK.prodBubble($root.find('.control'), 'video-window-not-open', {}, {positions:['bottom']})
|
||||
return
|
||||
|
|
|
|||
|
|
@ -14,4 +14,5 @@ context = window
|
|||
configureVideoPopupClosed: {}
|
||||
checkPromptConfigureVideo: {}
|
||||
setVideoEnabled: {}
|
||||
refreshVideoState: {}
|
||||
})
|
||||
|
|
@ -137,6 +137,21 @@ BackendToFrontendFPS = {
|
|||
@state.currentFrameRate = frameRates
|
||||
this.trigger(@state)
|
||||
|
||||
onRefreshVideoState:()->
|
||||
@logger.debug("onRefreshVideoState")
|
||||
openVideoSources = context.jamClient.getOpenVideoSources()
|
||||
@logger.debug("onRefreshVideoState", openVideoSources)
|
||||
|
||||
# possible keys, all bool values
|
||||
#"session_window", "webcam1", "webcam2", "screen_capture"
|
||||
|
||||
# ex: with mac webcam open only: session_window: 2, webcam1: 1}
|
||||
# no webcam open: Object {}
|
||||
|
||||
@anyVideoOpen = Object.keys(openVideoSources).length > 0
|
||||
@state.anyVideoOpen = Object.keys(openVideoSources).length > 0
|
||||
this.trigger(@state)
|
||||
|
||||
onSelectDevice: (device, caps) ->
|
||||
|
||||
# don't do anything if no video capabilities
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ class LandingsController < ApplicationController
|
|||
instrument = params[:instrument].downcase.sub('-', ' ')
|
||||
instrument = Instrument.find_by_id(instrument)
|
||||
instrument_id = instrument.id if instrument
|
||||
instrument_name = instrument.description
|
||||
instrument_name = instrument .description
|
||||
query, next_ptr, instrument_count = JamTrack.index({instrument: instrument_id}, current_user)
|
||||
end
|
||||
@jam_track = JamTrack.find_by_slug(params[:plan_code])
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ namespace :jam_tracks do
|
|||
JamTrackImporter.dry_run
|
||||
end
|
||||
|
||||
task create_clevie: :environment do |task, args|
|
||||
licensor = JamTrackLicensor.new()
|
||||
licensor.name = 'Steely & Clevie'
|
||||
licensor.slug = 'steely-and-clevie'
|
||||
licensor.save!
|
||||
end
|
||||
task tency_dry_run: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'Tency'
|
||||
JamTrackImporter.dry_run
|
||||
|
|
@ -50,6 +56,11 @@ namespace :jam_tracks do
|
|||
JamTrackImporter.dry_run
|
||||
end
|
||||
|
||||
task clevie_dry_run: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'Clevie'
|
||||
JamTrackImporter.dry_run
|
||||
end
|
||||
|
||||
task paris_create_masters: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'Paris'
|
||||
JamTrackImporter.create_masters
|
||||
|
|
@ -87,6 +98,18 @@ namespace :jam_tracks do
|
|||
JamTrackImporter.create_master(path)
|
||||
end
|
||||
|
||||
task clevie_create_master: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'Clevie'
|
||||
|
||||
path = ENV['TRACK_PATH']
|
||||
|
||||
if !path
|
||||
puts "TRACK_PATH must be set to something like audio/AC DC/Back in Black or mapped/50 Cent - In Da Club - 12401"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
JamTrackImporter.create_master(path)
|
||||
end
|
||||
|
||||
task tency_delta: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'Tency'
|
||||
|
|
@ -211,6 +234,11 @@ namespace :jam_tracks do
|
|||
JamTrackImporter.synchronize_all(skip_audio_upload: false)
|
||||
end
|
||||
|
||||
task sync_clevie: :environment do |task, args|
|
||||
JamTrackImporter.storage_format = 'Clevie'
|
||||
JamTrackImporter.synchronize_all(skip_audio_upload: false)
|
||||
end
|
||||
|
||||
task tency_dups: :environment do |task, args|
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue