songster-project/songster — pull request #66 by lfichtinger (2014-12-30 00:54:01+00:00)
Title: Feature/websocket one vote

i adapted the websocket event votes_changed to send only the current vote and not all votes

therefore:
* added date field to db collection votes
* vote model that is sent via the websocket is structured as:
{ song_id:
{ title: 'xxxx',
album: 'xxxx',
artist: 'xxx',
year: '2000',
_id: xxxxxxxxxxxxxxxxxxxx
},
state: 'new' ( or 'played'),
type: 'vote',
_id: xxxxxxxxxxxxxxxxxxxx,
date: xxxxxxxxxxxxxxxx
}
* the domain model of received_vote is adapted for this structure too
* votes are now counted on the client side - the map reduce on server-side is removed
* removing votes of a played song is triggered by the votes_changed event sent by the eventlog on the server and not by the music_changed event anymore