print " waiting for nothing to be playing"
while c.playing() is not None:
time.sleep(1)
+ print " ."
now = int(time.time())
track = "%s/Joe Bloggs/First Album/05:Fifth track.ogg" % dtest.tracks
print " scheduling a track for the future"
p = c.playing()
while p is None and waited < 10:
time.sleep(1)
+ print " ."
waited += 1
p = c.playing()
assert waited < 10, "checking track played within a reasonable period"
print " waiting for nothing to be playing"
while c.playing() is not None:
time.sleep(1)
+ print " ."
print " scheduling an enable-random for the future"
now = int(time.time())
c.schedule_add(now + 4, "normal", "set-global", "random-play", "yes")
p = c.playing()
while p is None and waited < 10:
time.sleep(1)
+ print " ."
waited += 1
p = c.playing()
assert waited < 10, "checking a track played within a reasonable period"
print " waiting for nothing to be playing"
while c.playing() is not None:
time.sleep(1)
+ print " ."
print " scheduling track to play later via command line"
now = int(time.time())
dtest.command(["disorder",
p = c.playing()
while p is None and waited < 10:
time.sleep(1)
+ print " ."
waited += 1
p = c.playing()
assert waited < 10, "checking track played within a reasonable period"
print " waiting for nothing to be playing"
while c.playing() is not None:
time.sleep(1)
+ print " ."
print " scheduling an enable-random for later via command line"
now = int(time.time())
dtest.command(["disorder",
p = c.playing()
while p is None and waited < 10:
time.sleep(1)
+ print " ."
waited += 1
p = c.playing()
assert waited < 10, "checking a track played within a reasonable period"
print " waiting for nothing to be playing"
while c.playing() is not None:
time.sleep(1)
+ print " ."
print " scheduling a track for the future"
now = int(time.time())
c.schedule_add(now + 4, "normal", "play", track)
p = c.playing()
while p is None and waited < 10:
time.sleep(1)
+ print " ."
waited += 1
p = c.playing()
assert p is None, "checking deleted scheduled event did not run"