#!/bin/sh
#
################################
#### CD Audio Player
v.1.0 #####
################################
#
# Copyright (c) 2003,
Simone Bianchini, http://web.tiscali.it/gnu.linux.
#
# This program is free
software; you can redistribute it and/or modify
# it under the terms of
the GNU General Public License as published by
# the Free Software
Foundation; either version 2 of the License, or
# (at your option) any
later version.
#
# This program is
distributed in the hope that it will be useful,
# but WITHOUT ANY
WARRANTY; without even the implied warranty of
# MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public
License for more details.
#
# You should have
received a copy of the GNU General Public License
# along with this
program; if not, write to the Free Software
# Foundation, Inc., 59
Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# CD Audio Player è un
front-end per cdplay costruito con Xdialog
#
# Dipendenze: cdplay
v.0.9 (http://www.x-paste.de/projects) - Xdialog
#
# Have fun!!
#
while [ 0 ]; do
Xdialog --separator "-"
--backtitle "CD Audio Player" --title "Audio Player v.1.0" --icon
"/user/local/share/cdplayer/nap.xpm" \
--menu \
"Benvenuti in Audio
Player v.1.0" 0 0 14 \
"PLAY" "Inizia
Riproduzione CD audio" \
"PAUSE" "Metti in pausa"
\
"RESUME" "Esci dalla
pausa" \
"STOP" "Termina la
riproduzione" \
"VOLUME" "Regolazione del
volume" \
"LIST" "Lista le tracce e
la durata" \
"RANDOM" "Inizia
Riproduzione Casuale" \
"EJECT" "Espelli il CD" \
"GO-TO" "Inizia
riproduzione traccia X" \
"NEXT" "Avanza nella
riproduzione" \
"BACK" "Torna indietro" \
"DEVICE" "Seleziona il
device" \
"HELP" "Aiuto" \
"CREDITS" "Autore, GPL,
Ringraziamenti" \
"EXIT" "Per uscire dal
menu" 2> $TMP/menu
if [ $? = 1 -o $? = 255
]; then
rm -f $TMP/menu
clear
exit 0
fi
MAINSELECT="`cat
$TMP/menu`"
rm $TMP/menu
if [ "$MAINSELECT" =
"PLAY" ]; then
cdplay -t1
Xdialog --separator "-"
--backtitle "CD Audio Player" --title "Audio Player v.1.0" --infobox
"PLAYING......" 10 40 1500
fi
if [ "$MAINSELECT" =
"PAUSE" ]; then
cdplay -p
clear
fi
if [ "$MAINSELECT" =
"RESUME" ]; then
cdplay -u
fi
if [ "$MAINSELECT" =
"STOP" ]; then
cdplay -s
fi
if [ "$MAINSELECT" =
"VOLUME" ]; then
aumix &
fi
if [ "$MAINSELECT" =
"LIST" ]; then
Xdialog --separator "-"
--backtitle "CD Audio Player" --title "Audio Player v.1.0" --msgbox
"`cdplay -i`" 20 40
clear
fi
if [ "$MAINSELECT" =
"RANDOM" ]; then
cdplay -r
clear
fi
if [ "$MAINSELECT" =
"EJECT" ]; then
Xdialog --separator "-"
--backtitle "CD Audio Player" --title "Audio Player v.1.0" --infobox
"EJECT......" 10 40 1500
cdplay -j
fi
if [ "$MAINSELECT" =
"GO-TO" ]; then
Xdialog --separator "-"
--backtitle "CD Audio Player" --title "Audio Player v.1.0"
--inputbox "Seleziona la traccia" 10 40 2> /tmp/track
TRACK=`cat /tmp/track`
rm /tmp/track
cdplay -t$TRACK
Xdialog --separator "-"
--backtitle "CD Audio Player" --title "Audio Player v.1.0" --infobox
"PLAYNG TRACK $TRACK" 10 40 1500
fi
if [ "$MAINSELECT" =
"NEXT" ]; then
cdplay -n
fi
if [ "$MAINSELECT" =
"BACK" ]; then
cdplay -b
fi
if [ "$MAINSELECT" =
"DEVICE" ]; then
Xdialog --separator "-"
--backtitle "CD Audio Player" --title "Audio Player v.1.0"
--inputbox "Inserisci il dispositivo di lettura" 10 40 2>
/tmp/device
DEVICE=`cat /tmp/device`
rm /tmp/device
cdplay -cd=$DEVICE
Xdialog --separator "-"
--backtitle "CD Audio Player" --title "Audio Player v.1.0" --infobox
"Il Device $DEVICE è stato selezionato per la riproduzione" 0 0 1500
fi
if [ "$MAINSELECT" =
"HELP" ]; then
Xdialog --left
--separator "-" --backtitle "CD Audio Player" --title "Audio Player
v.1.0" --msgbox "`cdplay -h`" 0 0
fi
if [ "$MAINSELECT" =
"CREDITS" ]; then
Xdialog --wrap --center
--title "Audio Player v.1.0" --backtitle "CD Audio Player"
--fixed-font --no-cancel --textbox
/user/local/share/cdplayer/gnu1.txt 0 0
fi
if [ "$MAINSELECT" =
"EXIT" ]; then
cdplay -sj
break
fi
done
clear
exit 0