sonos.sh
Feature: +remove a track from playlist
This commit is contained in:
26
sonos.sh
26
sonos.sh
@@ -526,7 +526,7 @@ soco_lists() {
|
||||
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 " 6) " " | " " 16) Remove a trac${bgd}k${reset} from a Sonos playlist " " | "
|
||||
echo -e " 7) " " | " " 17) " " | "
|
||||
echo -e " 8) Re${bgd}m${reset}ove from queue " " | " " 18) " " | "
|
||||
echo -e " 9) ${bgd}C${reset}lear queue " " | " " 19) " " | "
|
||||
@@ -549,6 +549,7 @@ soco_lists() {
|
||||
13|e|E) list_13;;
|
||||
14|l|L) list_14;;
|
||||
15|d|D) list_15;;
|
||||
16|k|K) list_16;;
|
||||
20|r|R) exec "$0";;
|
||||
*) echo -e "\n${red}Oops!!! Please Select Correct Choice${reset}";
|
||||
echo -e "Press ${bold}ENTER${reset} To Continue..." ; read ;;
|
||||
@@ -677,6 +678,29 @@ list_15() {
|
||||
# Give an error if empty playlist
|
||||
}
|
||||
|
||||
# Remove a track from a Sonos playlist
|
||||
list_16() {
|
||||
playing="Remove a track from a Sonos playlist..."
|
||||
echo -e "\n\033[1m $playing \033[0m"
|
||||
|
||||
while :
|
||||
do
|
||||
echo -e "\nList of Sonos playlist:"
|
||||
sonos $loc $device list_playlists
|
||||
|
||||
read -p "Enter a playlist <name>: " lsp
|
||||
sonos $loc $device list_playlist_tracks "$lsp"
|
||||
# Error: Can't pickle <class 'soco.music_services.data_structures.MSTrack'>: attribute lookup MSTrack on soco.music_services.data_structures failed
|
||||
# Erreur si la playlist contient des podcasts, pistes Deezer. Ok pour les mp3 dela Library.
|
||||
|
||||
read -p "Enter the <number> track to remove or [q] to quit: " trk
|
||||
if [[ "$trk" == "q" || "$trk" == "Q" ]]; then break; fi
|
||||
sonos $loc $device remove_from_playlist "$lsp" "$trk"
|
||||
# Give an error if empty playlist
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Soco device Infos Menu
|
||||
|
||||
soco_infos() {
|
||||
|
||||
Reference in New Issue
Block a user