# Play the selected local music file using mpv and shuffle the rest
# Play shuffled
mpv --shuffle --vid=no "$file"&&\
for choice in "${shuffled_keys[@]}";do
for file in $mDIR;do
file="${local_music[$choice]}"
if["$file" !="${local_music[$choice]}"];then
notification "$choice"
mpv --shuffle --vid=no "$file"
mpv --vid=no "$file"
fi
done
done
;;
*)
echo"Invalid choice"
;;
esac
}
}
# Main function for playing online music
# Main function for playing online music
@ -75,15 +90,14 @@ play_online_music() {
# Check if an online music process is running and send a notification, otherwise run the main function
# Check if an online music process is running and send a notification, otherwise run the main function
pkill mpv && notify-send -u low -i "$iDIR/music.png""Online Music stopped"||{
pkill mpv && notify-send -u low -i "$iDIR/music.png""Online Music stopped"||{
# Prompt the user to choose between local and online music
# Prompt the user to choose between local and online music
user_choice=$(printf"Play from Music Folder\nPlay from Online Stations"| rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source")
user_choice=$(printf"Play from Music Folder\nOnline Streaming"| rofi -dmenu -p "Select music source")