Changeset - 7eb3676b8fd6
[Not reviewed]
default
0 7 0
Drew Perttula - 8 years ago 2017-05-23 06:58:02
drewp@bigasterisk.com
more of the fixed add-to-song service
Ignore-this: 44b96a929b79ab201a80a6914b117f9d
7 files changed with 42 insertions and 19 deletions:
0 comments (0 inline, 0 general)
bin/effecteval
Show inline comments
 
@@ -62,7 +62,7 @@ class SongEffects(PrettyErrorHandler, cy
 
        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)
 

	
light9/effect/edit.py
Show inline comments
 
@@ -19,6 +19,9 @@ def getMusicStatus():
 

	
 
@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))
light9/rdfdb/currentstategraphapi.py
Show inline comments
 
@@ -10,7 +10,7 @@ class ReadOnlyConjunctiveGraph(object):
 
        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)
 

	
light9/rdfdb/syncedgraph.py
Show inline comments
 
@@ -125,6 +125,10 @@ class SyncedGraph(CurrentStateGraphApi, 
 
        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
light9/subserver/effects.coffee
Show inline comments
 
@@ -33,6 +33,21 @@ model.addToCurrentSong = (e) ->
 
    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?
light9/subserver/effects.jade
Show inline comments
 
@@ -30,6 +30,7 @@ html
 
          | 
 
          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")
 
        
show/dance2017/playlist.n3
Show inline comments
 
@@ -14,22 +14,22 @@ show:dance2017 :playList (
 
  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" .
 

	
 

	
0 comments (0 inline, 0 general)