Files
@ 0c54bd6e1630
Branch filter:
Location: light9/bin/ascoltami2 - annotation
0c54bd6e1630
2.1 KiB
text/plain
color picker no longer opens on hover, and no longer shows a rainbow in small mode.
Ignore-this: 637e296da9b59d81acf03eff16a4e193
you can also drag outside the large rainbow while picking and it'll snap to the closest
point.
Ignore-this: 637e296da9b59d81acf03eff16a4e193
you can also drag outside the large rainbow while picking and it'll snap to the closest
point.
a301a0039c66 224d6cd7e1e4 78690efc866c 3c523c71da29 1156d3531327 c962f19c7328 c962f19c7328 c962f19c7328 c962f19c7328 1156d3531327 94039df5cdd9 8d87a3528369 1156d3531327 1156d3531327 3c523c71da29 865532790e62 7772cc48e016 cca75951554a 7772cc48e016 94039df5cdd9 94039df5cdd9 94039df5cdd9 94039df5cdd9 94039df5cdd9 1156d3531327 94039df5cdd9 94039df5cdd9 94039df5cdd9 1156d3531327 8d87a3528369 8d87a3528369 94039df5cdd9 8d87a3528369 7772cc48e016 94039df5cdd9 94039df5cdd9 8d87a3528369 94039df5cdd9 7772cc48e016 94039df5cdd9 cca75951554a cca75951554a 1156d3531327 94039df5cdd9 7772cc48e016 7772cc48e016 7772cc48e016 7772cc48e016 7772cc48e016 7772cc48e016 7772cc48e016 94039df5cdd9 7772cc48e016 7772cc48e016 c2faa69099e6 94039df5cdd9 1156d3531327 94039df5cdd9 94039df5cdd9 94039df5cdd9 94039df5cdd9 7772cc48e016 94039df5cdd9 94039df5cdd9 c2faa69099e6 c2faa69099e6 c2faa69099e6 cca75951554a cca75951554a cca75951554a | #!bin/python
from run_local import log
from twisted.internet import reactor
import sys, optparse, logging
from rdflib import URIRef
import gi
gi.require_version('Gst', '1.0')
gi.require_version('Gtk', '3.0')
from light9.ascoltami.player import Player
from light9.ascoltami.playlist import Playlist, NoSuchSong
from light9.ascoltami.webapp import makeWebApp, songUri, songLocation
from light9 import networking, showconfig
from gi.repository import GObject, Gst
class App(object):
def __init__(self, graph, show):
self.graph = graph
self.player = Player(onEOS=self.onEOS)
self.show = show
self.playlist = Playlist.fromShow(graph, show)
def onEOS(self, song):
self.player.pause()
self.player.seek(0)
thisSongUri = songUri(graph, URIRef(song))
try:
nextSong = self.playlist.nextSong(thisSongUri)
except NoSuchSong: # we're at the end of the playlist
return
self.player.setSong(songLocation(graph, nextSong), play=False)
if __name__ == "__main__":
GObject.threads_init()
Gst.init(None)
parser = optparse.OptionParser()
parser.add_option(
'--show',
help='show URI, like http://light9.bigasterisk.com/show/dance2008',
default=showconfig.showUri())
parser.add_option("-v",
"--verbose",
action="store_true",
help="logging.DEBUG")
parser.add_option("--twistedlog",
action="store_true",
help="twisted logging")
(options, args) = parser.parse_args()
log.setLevel(logging.DEBUG if options.verbose else logging.INFO)
if not options.show:
raise ValueError("missing --show http://...")
graph = showconfig.getGraph()
app = App(graph, URIRef(options.show))
if options.twistedlog:
from twisted.python import log as twlog
twlog.startLogging(sys.stderr)
reactor.listenTCP(networking.musicPlayer.port, makeWebApp(app))
log.info("listening on %s" % networking.musicPlayer.port)
reactor.run()
|