forked from rissem/friend-sound
-
Notifications
You must be signed in to change notification settings - Fork 1
/
models.coffee
72 lines (67 loc) · 1.46 KB
/
models.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
###
# Knobs:
# fields:
# category
# value
#
# category value (displayed below is a range)
# tempo [0..500.0]
# loudness [-100.0..100.0]
# familiarity [0.0..1.0]
# hotttnesss [0.0..1.0]
# danceability [0.0..1.0]
# energy [0.0..1.0]
###
Knobs = new Meteor.Collection 'knobs'
###
# Access via markSongPlayed and hasSongPlayed
###
PlayedSongs = new Meteor.Collection 'playedSongs'
markSongPlayed = (song) -> PlayedSongs.insert song_id: song.song_id
hasSongPlayed = (song) ->
songId = song
if 'object' == typeof song
songId = song.song_id
PlayedSongs.findOne(song_id: songId)?
###
# Songs:
#
# song_id
# title
# artist_id
# artist_name
# tempo
# loudness
# danceability
# energy
# familiarity
# hotttnesss
###
Playlist = new Meteor.Collection 'playlist'
### CurrentSong:
# song_id
# title
# artist_id
# artist_name
# tempo
# loudness
# danceability
# energy
# familiarity
# hotttnesss
###
CurrentSong = new Meteor.Collection 'current_song'
###
# Players:
#
# id
# name
# idle
###
Players = new Meteor.Collection "players"
###
# Smurfs
#
# names for new players
###
smurfs = ['Papa','Brainy','Hefty','Handy','Jokey','Smurfette','Nat','Slouchy','Snappy','Grouchy','Greedy','Dreamy','Wooly','Nobody','Somebody','Vanity','Clumsy','Lazy','Poet','Farmer','Tailor','Harmony','Painter','Tracker','Miner','Weakling','Scaredy','Editor','Reporter','Flighty','Sweepy','Weepy','Sickly','Dabbler','Timber','Sloppy','Nosey','Timid','Tuffy','Pushover','Marco','Medic','Double','Golfer','Barber']