File [scripts/mpd_track_list.sh]
1 |
#!/bin/bash |
2 |
if [ $# -eq 0 ]; then |
3 |
echo "usage $0 host" |
4 |
exit 1 |
5 |
fi |
6 |
# Define the path and any password options for MPD |
7 |
MY_MPC="/usr/bin/mpc -h $1" |
8 |
# Check if the server is up and running |
9 |
ping -c 2 -W 1 $1 2>&;1>/dev/null |
10 |
if [ $? -eq 0 ]; then |
11 |
# Define acceptable genres of random tracks to add |
12 |
MY_GENRES="Dance Electronica Folk Funk Indie Jazz Pop |
13 |
Reggae Rock Soul Soundtrack" |
14 |
# Define Anything to strip out |
15 |
MY_STRIP="Wiggles Fuck Shit" |
16 |
# Remove the track list file if it exists |
17 |
rm -f /tmp/random_mpd_tracks.txt |
18 |
for genre in ${MY_GENRES} |
19 |
do |
20 |
$MY_MPC search genre ${genre} >> /tmp/random_mpd_tracks.txt |
21 |
done |
22 |
for strip in ${MY_STRIP} |
23 |
do |
24 |
grep -v -i ${strip} /tmp/random_mpd_tracks.txt > /tmp/random_mpd_tracks_out.txt |
25 |
mv /tmp/random_mpd_tracks_out.txt /tmp/random_mpd_tracks.txt |
26 |
done |
27 |
fi |
Computing Power
- Acer Aspire R3700
- Acknowledgements
- BOINC
- Desktop PC
- Eee PC 4G (701)
- Eee PC 901
- Gigabit Network
- Inspiron 14 5485 Laptop
- Kids PC 1
- Kids PC 2
- Media PC
- Mini-ITX PC
- My Useful Scripts
- Nano ITX PC
- Nook Simple Touch
- Processing Power
- Raspberry Pi
- Sharp Zaurus SL-C3200
- Storage Capacity
- The Server
- What Is Firmware
Galleries
(* updated in last 14 days)