This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file session_file.h | |
* @Author Bogdan Dumitru ([email protected]) | |
* @date July, 2012 | |
* @brief Functions related to the processing of Ableton Live Session files (.als) | |
* | |
* The functions regarding processing of ALS files. This is currently devided in | |
* three subsections with appropriate prefixes: | |
* | |
* (1) Regarding specifically to ALS files and entities: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def write(type, attributes, plan) | |
geo = resolve_geo(attributes[:remote_addr]) | |
listener = | |
if attributes[:anonymous] == true | |
-1 | |
else | |
( attributes[:user_id].to_i == 0 ? nil : attributes[:user_id].to_i ) | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updates: | |
totals | |
{ 'b' } | |
tracks | |
{ 't', 'b', 'u' } # This is theoretically irrelevant | |
# because track links 1-to-1 to user | |
{ 't', 'b' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updates: | |
totals | |
{ 'b' } | |
tracks | |
{ 't', 'b', 'u' } # This is theoretically irrelevant | |
# because track links 1-to-1 to user | |
{ 't', 'b' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Indexes for [apps/track] | |
_id_ | |
t_1 | |
t_-1_b_-1_v_-1_c_-1 | |
t_-1_b_-1_v_-1_d_-1 | |
t_-1_b_-1_v_-1_f_-1 | |
t_-1_b_-1_v_-1_p_-1 | |
Indexes for [apps/track/slim] | |
_id_ | |
t_1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists?(referrer = event[:referrer]) | |
if ((matches = referrer.match(/([^\#]+)\#(.+)?\:(.+)?/))) && matches.size == 4 | |
detail = "#{DETAILS}.#{escape(matches[2])}.#{escape(matches[3])}.#{PLAYS}" | |
# Here we split the stuff in the specialised referrer | |
# i.e. facebook.com#p:AwsomePage | |
# And we increment the detail below, but in the REFERRER for the update | |
# referrer is passed instead of matches[1] ( which is just the facebook.com ) | |
buckets.each do |bucket| | |
@referrers_per_track.update({ TRACK => track_id, BUCKET => bucket, REFERRER => referrer }, { | |
'$inc' => { |
NewerOlder