create semaphore to stop mosto from trying to sync melted while we're modifying it
make getServerPlaylist return a promise

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
load clips from melted on init
make getServerStatus return a promise

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
fetch at the end of init
after syncing with the playlist, I get the status, and process the collection further
easy answers
populate clips' start and end attributes

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
have sendCommand return a promise

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
move removeClip to promises

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
move insertClip to promises

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
use media.start for sorting instead of refering to playlist

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
move medias time adjustment to it's own method in MeltedCollection

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
adjust times when melted is stopped as well

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
automatically add and remove medias from melted

Signed-off-by: Tomas Neme <lacrymology@gmail.com>
Merge branch 'Lacrymology/mosto-backbone' into jmrunge/heartbeats
Moved goto to promises

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Fixed syncMelted to use getServerStatus promise

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Changed fixMelted to use and return goto promise

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
Moved syncMelted to promises

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>