diff --git a/cdoseaplay/lights.py b/cdoseaplay/lights.py index 755d565..cb963fd 100755 --- a/cdoseaplay/lights.py +++ b/cdoseaplay/lights.py @@ -46,13 +46,15 @@ LIGHTS = { def switch(state): lights, fade = LIGHTS[state] - lb = lanbox.LanboxMethods() + lb = lanbox.Lanbox() #lb.getChannels(lights) - lb.fadeTo(lights, fade) + #lb.fadeTo(lights, fade) + lb.layerGo(state + 1) if __name__ == '__main__': path = sys.argv[1] + no_sleep = len(sys.argv) > 2 n = int(os.path.getctime(path) - 1495280000) info = ox.avinfo(path) @@ -66,6 +68,7 @@ if __name__ == '__main__': light = seq() if pos + sleep > duration: break - time.sleep(sleep) + if not no_sleep: + time.sleep(sleep) switch(light) pos += sleep