VRFS-2874 : Clean up code and logic - fixes problem of false positive.
This commit is contained in:
parent
168d1e77f1
commit
705e67a810
|
|
@ -3,7 +3,7 @@ module JamRuby
|
|||
|
||||
@@log = Logging.logger[Recording]
|
||||
|
||||
attr_accessible :owner, :owner_id, :band, :band_id, :recorded_tracks_attributes, :mixes_attributes, :claimed_recordings_attributes, :name, :description, :genre, :is_public, :duration, as: :admin
|
||||
attr_accessible :owner, :owner_id, :band, :band_id, :recorded_tracks_attributes, :mixes_attributes, :claimed_recordings_attributes, :name, :description, :genre, :is_public, :duration, :jam_track_id, as: :admin
|
||||
|
||||
has_many :users, :through => :recorded_tracks, :class_name => "JamRuby::User"
|
||||
has_many :claimed_recordings, :class_name => "JamRuby::ClaimedRecording", :inverse_of => :recording, :foreign_key => 'recording_id', :dependent => :destroy
|
||||
|
|
|
|||
|
|
@ -256,13 +256,13 @@
|
|||
|
||||
function trackJamTrackPlaySession(sessionId, inSession) {
|
||||
rest.getSession(sessionId).done(function(session) {
|
||||
if (session && session.jam_track_id && typeof(session.jam_track_id)!='undefined') {
|
||||
rest.getJamTracks({id:session.jam_track_id}).done(function(response) {
|
||||
if (response.jamtracks && response.jamtracks.length==1) {
|
||||
if (session && session.jam_track ) {
|
||||
rest.getJamTracks({id:session.jam_track.id}).done(function(response) {
|
||||
if (response.jamtracks && response.jamtracks.length!=0) {
|
||||
var jamtrack = response.jamtracks[0]
|
||||
trackJamTrackPlay(
|
||||
jamtrack.sales_region!=context.JK.AVAILABILITY_US,
|
||||
session.participants.length > 0,
|
||||
session.participants.length > 1,
|
||||
inSession);
|
||||
}// if
|
||||
})// rest.getJamTracks
|
||||
|
|
|
|||
Loading…
Reference in New Issue