Mercurial > code > home > repos > light9
changeset 1558:7eb3676b8fd6
more of the fixed add-to-song service
Ignore-this: 44b96a929b79ab201a80a6914b117f9d
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Tue, 23 May 2017 06:58:02 +0000 |
parents | 104ff4606565 |
children | 1ba1d46a70a2 |
files | bin/effecteval light9/effect/edit.py light9/rdfdb/currentstategraphapi.py light9/rdfdb/syncedgraph.py light9/subserver/effects.coffee light9/subserver/effects.jade show/dance2017/playlist.n3 |
diffstat | 7 files changed, 42 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/effecteval Tue May 23 06:32:15 2017 +0000 +++ b/bin/effecteval Tue May 23 06:58:02 2017 +0000 @@ -62,7 +62,7 @@ except Exception: # which? song = yield currentSong() - event = self.get_argument('event') or 'default' + event = self.get_argument('event', default='default') log.info("adding to %s", song)
--- a/light9/effect/edit.py Tue May 23 06:32:15 2017 +0000 +++ b/light9/effect/edit.py Tue May 23 06:58:02 2017 +0000 @@ -19,6 +19,9 @@ @inlineCallbacks def songEffectPatch(graph, dropped, song, event, ctx): + """ + some uri was 'dropped' in the timeline. event is 'default' or 'start' or 'end'. + """ with graph.currentState( tripleFilter=(dropped, None, None)) as g: droppedTypes = list(g.objects(dropped, RDF.type))
--- a/light9/rdfdb/currentstategraphapi.py Tue May 23 06:32:15 2017 +0000 +++ b/light9/rdfdb/currentstategraphapi.py Tue May 23 06:58:02 2017 +0000 @@ -10,7 +10,7 @@ self.graph = graph def __getattr__(self, attr): - if attr in ['subjects', 'value', 'objects', 'triples']: # not complete + if attr in ['subjects', 'value', 'objects', 'triples', 'label']: # not complete return getattr(self.graph, attr) raise TypeError("can't access %r of read-only graph" % attr)
--- a/light9/rdfdb/syncedgraph.py Tue May 23 06:32:15 2017 +0000 +++ b/light9/rdfdb/syncedgraph.py Tue May 23 06:58:02 2017 +0000 @@ -125,6 +125,10 @@ self._sender.sendPatch(p).addErrback(self.sendFailed) log.debug('patch is done %s', debugKey) + def suggestPrefixes(self, prefixes): + song note edit should put song: to the song uri + self.addlPrefixes.update(prefixes) + def sendFailed(self, result): """ we asked for a patch to be queued and sent to the master, and
--- a/light9/subserver/effects.coffee Tue May 23 06:32:15 2017 +0000 +++ b/light9/subserver/effects.coffee Tue May 23 06:58:02 2017 +0000 @@ -33,6 +33,21 @@ data: {drop: e.uri} }) +model.addMomentary = (e) -> + $.ajax({ + type: 'POST' + url: '/effectEval/songEffects' + data: {drop: e.uri, event: 'start'} + }) + +model.addMomentaryUp = (e) -> + $.ajax({ + type: 'POST' + url: '/effectEval/songEffects' + data: {drop: e.uri, event: 'end'} + }) + + reconnectingWebSocket "../effectsUpdates", (msg) -> model.chases(msg.chases) if msg.chases? model.classes(msg.classes) if msg.classes?
--- a/light9/subserver/effects.jade Tue May 23 06:32:15 2017 +0000 +++ b/light9/subserver/effects.jade Tue May 23 06:58:02 2017 +0000 @@ -30,6 +30,7 @@ | a(data-bind="attr: {href: uri}, text: label") button(data-bind="click: $root.addToCurrentSong") Add to current song + button(data-bind="event: { mousedown: $root.addMomentary, mouseup: $root.addMomentaryUp }") Add momentary div code(data-bind="text: code")
--- a/show/dance2017/playlist.n3 Tue May 23 06:32:15 2017 +0000 +++ b/show/dance2017/playlist.n3 Tue May 23 06:58:02 2017 +0000 @@ -14,22 +14,22 @@ sh:song16 sh:song17 sh:song18 ) . -sh:song1 a :Song; rdfs:label "01"; :songFilename "01.wav" . -sh:song2 a :Song; rdfs:label "02"; :songFilename "02.wav" . -sh:song3 a :Song; rdfs:label "03"; :songFilename "03.wav" . -sh:song4 a :Song; rdfs:label "04"; :songFilename "04.wav" . -sh:song5 a :Song; rdfs:label "05"; :songFilename "05.wav" . -sh:song6 a :Song; rdfs:label "06"; :songFilename "06.wav" . -sh:song7 a :Song; rdfs:label "07"; :songFilename "07.wav" . -sh:song8 a :Song; rdfs:label "08"; :songFilename "08.wav" . -sh:song9 a :Song; rdfs:label "09"; :songFilename "09.wav" . -sh:song10 a :Song; rdfs:label "10"; :songFilename "10.wav" . -sh:song11 a :Song; rdfs:label "11"; :songFilename "11.wav" . -sh:song12 a :Song; rdfs:label "12"; :songFilename "12.wav" . -sh:song13 a :Song; rdfs:label "13"; :songFilename "13.wav" . -sh:song14 a :Song; rdfs:label "14"; :songFilename "14.wav" . -sh:song15 a :Song; rdfs:label "15"; :songFilename "15.wav" . -sh:song16 a :Song; rdfs:label "16"; :songFilename "16.wav" . -sh:song17 a :Song; rdfs:label "17"; :songFilename "17.wav" . +sh:song1 a :Song; rdfs:label "01"; :songFilename "01-out.wav" . +sh:song2 a :Song; rdfs:label "02"; :songFilename "02-out.wav" . +sh:song3 a :Song; rdfs:label "03"; :songFilename "03-out.wav" . +sh:song4 a :Song; rdfs:label "04"; :songFilename "04-out.wav" . +sh:song5 a :Song; rdfs:label "05"; :songFilename "05-out.wav" . +sh:song6 a :Song; rdfs:label "06"; :songFilename "06-out.wav" . +sh:song7 a :Song; rdfs:label "07"; :songFilename "07-out.wav" . +sh:song8 a :Song; rdfs:label "08"; :songFilename "08-out.wav" . +sh:song9 a :Song; rdfs:label "09"; :songFilename "09-out.wav" . +sh:song10 a :Song; rdfs:label "10"; :songFilename "10-out.wav" . +sh:song11 a :Song; rdfs:label "11"; :songFilename "11-out.wav" . +sh:song12 a :Song; rdfs:label "12"; :songFilename "12-out.wav" . +sh:song13 a :Song; rdfs:label "13"; :songFilename "13-out.wav" . +sh:song14 a :Song; rdfs:label "14"; :songFilename "14-out.wav" . +sh:song15 a :Song; rdfs:label "15"; :songFilename "15-africaout.wav" . +sh:song16 a :Song; rdfs:label "16"; :songFilename "16-out.wav" . +sh:song17 a :Song; rdfs:label "17"; :songFilename "17-out.wav" .