<commit_before>/*globals app, console, R, Backbone, Firebase, rdioUserKey, firebaseToken, firebaseRootUrl, firebaseRef */

window.app = window.app || {};

app.currentUserKey = rdioUserKey;

app.roomUrl = firebaseRootUrl;

app.Player = Backbone.Model.extend({
  initialize: function() {
    var self = this
  },
  setState: function(data) {
    console.log(data);
    this.set('playingTrack', {
      'trackKey': data['playing_track_key'],
      'userKey': ''
    })
    this.set('position', data['playing_track_position'])
  }
});

app.PlaylistView = Backbone.View.extend({
  el: '.playlist',
  template: _.template($('#playlist-template').html()),

  events: {
    "click .playlist-today": "onPlaylistTodayClick",
    "click .playlist-room-history": "onPlaylistRoomHistoryClick"
  },
  initialize: function() {
    this.snapped = false;
    this.render();
  },
  render: function() {<commit_msg>Set position better on load<commit_after>/*globals app, console, R, Backbone, Firebase, rdioUserKey, firebaseToken, firebaseRootUrl, firebaseRef */

window.app = window.app || {};

app.currentUserKey = rdioUserKey;

app.roomUrl = firebaseRootUrl;

app.Player = Backbone.Model.extend({
  initialize: function() {
    var self = this
  },
  setState: function(data) {
    console.log(data);
    this.set('position', data['playing_track_position'])
    this.set('playingTrack', {
      'trackKey': data['playing_track_key'],
      'userKey': ''
    })
  }
});

app.PlaylistView = Backbone.View.extend({
  el: '.playlist',
  template: _.template($('#playlist-template').html()),

  events: {
    "click .playlist-today": "onPlaylistTodayClick",
    "click .playlist-room-history": "onPlaylistRoomHistoryClick"
  },
  initialize: function() {
    this.snapped = false;
    this.render();
  },
  render: function() {
{'fraction_non_alphanumeric': 0.1638981173864895, 'fraction_numerical': 0.0, 'mean_word_length': 4.061624649859944, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '898742', 'n_tokens_mistral': 609, 'n_tokens_neox': 592, 'n_words': 108}