sonos.sh
Features: +list playlists +delete playlists
This commit is contained in:
46
sonos.sh
46
sonos.sh
@@ -518,20 +518,20 @@ soco_lists() {
|
||||
echo -e "\033[1m 🔊 Sonos lists $device \033[0m"
|
||||
echo -e ""
|
||||
echo -e " "
|
||||
echo -e "--------------------------------"
|
||||
echo -e "-----------------------------------------------------------------------------"
|
||||
echo -e " Sonos $device lists Menu "
|
||||
echo -e "--------------------------------"
|
||||
echo -e "---------------------------------------------------------------------------"
|
||||
echo -e " 1) Favourite radio ${bgd}s${reset}tations " " | " " 11) Create Sonos ${bgd}p${reset}laylist " " | "
|
||||
echo -e " 2) ${bgd}F${reset}avourites " " | " " 12) ${bgd}L${reset}ists tracks in all Sonos Playlists " " | "
|
||||
echo -e " 3) ${bgd}Q${reset}ueue " " | " " 13) Ad${bgd}d${reset} a Sonos playlist to queue " " | "
|
||||
echo -e " 4) List ${bgd}a${reset}rtists " " | " " 14) " " | "
|
||||
echo -e " 5) List al${bgd}b${reset}ums " " | " " 15) " " | "
|
||||
echo -e " 2) ${bgd}F${reset}avourites " " | " " 12) L${bgd}i${reset}st playlists " " | "
|
||||
echo -e " 3) ${bgd}Q${reset}ueue " " | " " 13) D${bgd}e${reset}lete playlists " " | "
|
||||
echo -e " 4) List ${bgd}a${reset}rtists " " | " " 14) ${bgd}L${reset}ists tracks in all Sonos Playlists " " | "
|
||||
echo -e " 5) List al${bgd}b${reset}ums " " | " " 15) Ad${bgd}d${reset} a Sonos playlist to queue " " | "
|
||||
echo -e " 6) " " | " " 16) " " | "
|
||||
echo -e " 7) " " | " " 17) " " | "
|
||||
echo -e " 8) Re${bgd}m${reset}ove from queue " " | " " 18) " " | "
|
||||
echo -e " 9) ${bgd}C${reset}lear queue " " | " " 19) " " | "
|
||||
echo -e "10) " " | " " 20) ${bgd}R${reset}eturn " " | "
|
||||
echo -e "================================"
|
||||
echo -e "==========================================================================="
|
||||
echo -e "Enter your menu choice [1-10]: \c "
|
||||
read lists
|
||||
|
||||
@@ -545,8 +545,10 @@ soco_lists() {
|
||||
8|m|M) list_8;;
|
||||
9|c|C) list_9;;
|
||||
11|p|P) list_11;;
|
||||
12|l|L) list_12;;
|
||||
13|d|D) list_13;;
|
||||
12|i|I) list_12;;
|
||||
13|e|E) list_13;;
|
||||
14|l|L) list_14;;
|
||||
15|d|D) list_15;;
|
||||
20|r|R) exec "$0";;
|
||||
*) echo -e "\n${red}Oops!!! Please Select Correct Choice${reset}";
|
||||
echo -e "Press ${bold}ENTER${reset} To Continue..." ; read ;;
|
||||
@@ -632,8 +634,30 @@ list_11() {
|
||||
sonos $loc $device create_playlist "$name"
|
||||
}
|
||||
|
||||
# Create Sonos playlist
|
||||
#list_playlists
|
||||
list_12() {
|
||||
echo -e "\n\033[1m List Sonos playlist... \033[0m"
|
||||
l=$(sonos $loc $device list_playlists)
|
||||
echo -e "\n $l \n"
|
||||
read -p "< Press Enter>"
|
||||
}
|
||||
|
||||
#delete_playlist
|
||||
list_13() {
|
||||
echo -e "\n\033[1m Delete Sonos playlist... \033[0m"
|
||||
|
||||
while :
|
||||
do
|
||||
sonos $loc $device list_playlists
|
||||
|
||||
read -p "Enter playlist <playlist> to delete or [q] to quit: " pll
|
||||
if [[ "$pll" == "q" || "$pll" == "Q" ]]; then break; fi
|
||||
sonos $loc $device delete_playlist $pll
|
||||
done
|
||||
}
|
||||
|
||||
# List tracks in all Sonos Playlists
|
||||
list_14() {
|
||||
echo -e "\n\033[1m List tracks in all Sonos Playlists... \033[0m"
|
||||
c=$(sonos $loc $device list_all_playlist_tracks)
|
||||
echo -e "\n $c \n"
|
||||
@@ -641,7 +665,7 @@ list_12() {
|
||||
}
|
||||
|
||||
# Add a Sonos playlist to queue
|
||||
list_13() {
|
||||
list_15() {
|
||||
playing="Add Sonos playlist to queue..."
|
||||
echo -e "\n\033[1m $playing \033[0m"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user