   ).property('currentState')
 
   contentDidChange: (->
-    @get('player').set('event', @get('content').toArray()[0]) unless @get('player.event')
+    @get('player').set('event', @get('content').toArray()[0]) if @get('player.event') == null
   ).observes('content.@each')
 
   queryTermDidChange: (->

  ).observes('selectedCountries.@each', 'selectedTags.@each', 'query.length')

  currentPageDidChange: (->
    @set('currentState', @get('states.reloading'))
    @set('content', [])

    @send('reload', => @set('currentState', @get('states.idle')))
  ).observes('currentPage')


Yossarian.EventsController = Ember.ArrayController.extend
  states:    { idle: 0, reloading: 1 }
  tags:      ['electronic', 'punk', 'house', 'folk', 'funk', 'minimal', 'jazz', 'rap', 'indie', 'hardcore', 'rock', 'country', 'dubstep', 'techno', 'reggae', 'hip-hop', 'alternative']
  countries: ['Finland', 'France', 'Italy', 'Poland', 'Ireland', 'Germany', 'Iceland', 'Belgium', 'Sweden', 'Netherlands', 'United Kingdom', 'Hungary', 'Denmark', 'Switzerland', 'Czech Republic', 'Spain', 'Croatia', 'Portugal', 'Ukraine', 'Serbia', 'Austria', 'Norway', 'Turkey', 'Bosnia and Herzegovina', 'Macedonia', 'Latvia', 'Bulgaria', 'Slovakia', 'Belarus', 'Greece', 'Estonia', 'Luxembourg', 'Slovenia', 'Lithuania', 'Romania', 'Malta']

  query:             null
  queryTerm:         null
