|
@@ -78,14 +78,19 @@ handle_term()
|
|
|
###############################################################################
|
|
|
# MAIN SECTION #
|
|
|
###############################################################################
|
|
|
+
|
|
|
+# Parse command line
|
|
|
while getopts m: f; do
|
|
|
case $f in
|
|
|
- m) MPV_CMDLINE=$(echo "${OPTARG}" | sed -e 's/^ */--/' -e 's/, */ --/g');;
|
|
|
+ m)
|
|
|
+ MPV_CMDLINE=$(echo "${OPTARG}" | sed -e 's/^ */--/' -e 's/, */ --/g')
|
|
|
+ ;;
|
|
|
esac
|
|
|
done
|
|
|
shift `expr $OPTIND - 1`
|
|
|
|
|
|
-trap handle_term TERM # Use our custom handler for the TERM signal
|
|
|
+# Use our custom handler for the TERM signal
|
|
|
+trap handle_term TERM
|
|
|
|
|
|
# Fetch the artist list from the website and let the user select from a menu
|
|
|
CHOICES=$(get_library "${WEBSITE}" | select_artist_list "${WEBSITE}")
|