USAGE = """Usage:
-fadio.py [time [min|max]]
+mfade [time [min|max]]
* time in seconds
* min|max in percentag
self.cli.disconnect()
def _consume_sopt(self):
- """
- """
+ """"""
options = sys.argv
if len(sys.argv) >1 and sys.argv[1] in ['-h', '--help']:
print USAGE
sleep(1)
def fade(self):
+ """"""
span = float(self.volum - self.mpd_vol)
step = span / float(60 * self.tempo)
print step
print 'Warning: external volume change, aborting!'
break
vol += step
- print step, int(vol)
self.cli.setvol(int(vol))
if abs(vol - self.volum) < 1:
self.cli.setvol(self.volum)