# Play the selected local music file using mpv and shuffle the rest
mpv --shuffle --vid=no "$file"&&\
for file in $mDIR;do
if["$file" !="${local_music[$choice]}"];then
mpv --shuffle --vid=no "$file"
fi
# Play shuffled
for choice in "${shuffled_keys[@]}";do
file="${local_music[$choice]}"
notification "$choice"
mpv --vid=no "$file"
done
;;
*)
echo"Invalid choice"
;;
esac
}
# 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
pkill mpv && notify-send -u low -i "$iDIR/music.png""Online Music stopped"||{
# 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")