Contributions
From giantdisc
Contributions
The following are some contributions and tips sent in by you, the GiantDisc users. Note that some of these are a bit out-dated and may possibly not work with current GD versions. But they might nevertheless be helpful to you in various circumstances. Feel free to update them or add your own tips here!
Auto download cover art from Amazon script (by Mark Alston)
To complement the new support for cover art I hacked together this script to automate getting your cover art. I have over 800 albums in my GiantDisc server and wasn't about to scan those all in by hand or even hand upload them all.
This script connects to Amazon.com and tries to find a cover art image for your album. If found it downloads it to your GiantDisc system (converting to jpg if neccessary) and updates your database.
For best results with multi-disc albums you should use the format "Someones Neat Album (Disc 1)" for the titles.
If it is currently named: "Someones Neat Album - Disc 1" You will have problems matching it.
I was able to download all but a handfull of my albums cover art in a matter of minutes on my DSL connection. The only discs that couldn't be found we some classical albumns, local artists and odd stuff that amazon doesn't sell.
See the source code for more info: [1]
Controlling GD with your multimedia keyboard (by Frank, Nov 2005)
Frank has written a few small scripts to use the keys on a multimedia keyboard to control GD. This is also possible if the keyboard is connected to a different computer than the one GD is running on.
Requirements:
- Webinterface by Phil gd.philsworld.de
- Lineak lineak.sf.net
- optionally: xosd (for on screen display what is happening)
The file lineak_ctl.php needs to go into the webint's home directory. It is called by the shell scripts. The shell scripts need to be called by lineak (->your keys)
The scripts can be downloaded here or at [2]
Diskless GiantDisc station using LTSP (by Sebastian, Jan 2004)
Sebastian has built a diskless - and therefore noiseless - GiantDisc station. Many thanks to him for his excellent Running Giantdisc with LTSP HOWTO.
SuSE startup script (by erdwurm, Jan 2004)
I run on my Mp3Box SuSE 9.0 pro. I think the startup procedure should be the same:
First create an startup-script in the directory /etc/init.d "Giantdisc" could be a good name. My script is very simple:
#!/bin/sh
### BEGIN INIT INFO
# Provides: giantdisc
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 5
# Description: Run the giantdisc Server
### END INIT INFO
case "$1" in
'start')
su --command="/home/music/bin/gdd-wrapper.sh" music&
;;
'stop')
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
# End of the script.
Then it's necessary to create an symbolic link to /etc/init.d/rc3.d. The name of the link could be S99???. All links (or the connected scripts) with Snumber??? will be started in the sort order. Be sure that you run the Giantdisc server after you have started mySQL.
It's not necessary to change anything in the file /etc/rc.local. Older Versions of SuSE use this file for the system wide configuration. The newer Versions use the "classical" Linux configuration system.
Debian startup script (by jannemann)
(originally contributed Jan 2004, updated June 2008 to work with GD 1.44+)
I have a debian system and use this script to start and stop giantdisc:
#! /bin/sh
# init script for giantdisc
# Autor: jannemann
PROG=/home/music/bin/gdd.pl
GDDSTART=/home/music/bin/gdd-wrapper.sh
SLEEP=2 # seconds to wait when restarting
#[ -x $PROG ] || exit 5
PID=`pidof -x $PROG`
case "$1" in
start)
#echo "$PID"
if [ -z $PID ] ; then
echo "Starting $PROG"
su music -c $GDDSTART&
else
echo "$PROG already running (PID $PID)"
fi
;;
stop)
if [ -z $PID ] ; then
echo "$PROG is not running"
else
echo "Stopping $PROG"
kill $PID
fi
;;
status)
[ -z $PID ] || echo "$PROG running (PID $PID)"
[ -z $PID ] && echo "$PROG not running"
;;
restart|force-reload)
sh $0 stop
sleep $SLEEP
sh $0 start
;;
*)
echo "Usage : $0 {start|stop|status|restart|force-reload}"
exit 2
;;
esac
exit 0
This script is in the /etc/init.d diretory and to create the mandatory links in the /etc/rc.? directories I had to execute the command:
update-rc.d gdd defaults
that works for me, so maybe it helps you too.
RedHat startup script (by eilgei)
#!/bin/bash
#
# Startup script for the GiantDisc Server
#
# chkconfig: - 85 15
# description: Giant Disc Jukebox
# processname: giantdisc
# pidfile: /var/run/giantdisc.pid
# Source function library.
. /etc/rc.d/init.d/functions
giantdisc=/home/music/bin/gdd.pl
prog=giantdisc
RETVAL=0
start() {
echo -n $"Starting $prog: "
chmod 666 /dev/dsp
chown music.music /dev/dsp
chmod 666 /dev/hdc
chmod 666 /dev/cdrom
chmod 666 /dev/mixer
chown music.music /dev/mixer
PATH=$PATH:/usr/local/bin:/home/music/bin
export PATH
su -c "$giantdisc>/dev/null" music&
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/giantdisc
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $giantdisc
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/giantdisc /var/run/giantdisc.pid
}
reload() {
echo -n $"Reloading $prog: "
killproc $giantdisc -HUP
RETVAL=$?
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $giantdisc
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/run/giantdisc.pid ] ; then
stop
start
fi
;;
reload)
reload
;;
*)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
exit 1
esac
exit $RETVAL
