Bright Player 0.4

Timo Juhani Lindfors timo.lindfors at iki.fi
Wed Apr 28 01:04:18 CEST 2010


Daniel MT <faltantornillos at gmail.com> writes:
> http://www.faltantornillos.net/proyectos/gnu/brightPlayer/brightPlayer0.4.tar.gz

some random comments:

1) tar zxf extracts the files to cwd. it is customary to have a
subdirectory inside the tar, like brightPlayer-0.4.

2) files are not executable. Usually people expect they can type

"brightPlayer"

to start brightPlayer instead of having to type

python /usr/bin/brightPlayer.py

3) installation instructions and/or scripts are missing.

4) brightGTK.py is apparently hardcoded to read
/usr/share/pixmaps/brightPlayer.png -- does this mean that it is not
possible to install the program to home directory?

5) os.system('killall mplayer & amixer cset iface=MIXER,name=\'Amp Spk Switch\' off > /dev/null & kill `ps -e -o pid,command | grep [b]rightDetector.py | awk {\'print $1\'}` &')

is not very nice. It kills my mplayer process that is recording a
radio show using the -dumpstream option.. If your process starts
mplayer you should write down the pid and kill it by that. Something like

pid = os.fork()
if pid == 0:
 os.exec...(mplayer...)
else:
 print("pid of mplayer is %s" % pid)

should work.

6)

os.system('echo 1 > /sys/class/backlight/gta02-bl/bl_power')

works only as root. Am I supposed to run the music player as root?

7)

os.system('renice -15 -p $(pidof mplayer)')

ditto.

8)

os.system('amixer cset iface=MIXER,name=\'Amp Spk Switch\' on > /dev/null &')

you can use -q to make amixer silent instead of > /dev/null..




-Timo



More information about the community mailing list