-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskip.sh.0
executable file
·32 lines (27 loc) · 925 Bytes
/
skip.sh.0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# NB: This script requires that the user have access to edit /var/log/mpd/mpd.log which means modifying the permissions/ownership
#mpdconf="/etc/mpd.conf"
#logsong() {
# i=$(date '+%b %d %H:%M : player: skipped ')
# j=$(mpcp current -f %file%)
# printf '%s\"%s\"\n' "$i" "$j" | cat >> "$mpdlog"
#}
#mpcp() {
# command mpc -P Passwword123 "$@"
#}
#if [[ -f "$mpdconf" ]] # defines the location of your mpd logfile path; this is defined in the mpd.conf file found at /etc/mpd.conf by default
# then
# mpdlog=$(grep -v "^#" "$mpdconf" | grep -v "^$" | grep log_file)
# mpdlog="${mpdlog%*\"}"
# mpdlog="${mpdlog#*\"}"
# mpdlog="${mpdlog%/}"
# else
# mpdlog="/var/log/mpd/mpd.log" # manually code the location if /etc/mpd.conf doesn't exist.
#fi
. mpdignore.functions
#. /usr/local/bin/mpdignore.functions
#. /usr/local/bin/mpdignore.functions
getmpdlog
getmpdpass
logsong "skipped"
mpcp next