add scripts
This commit is contained in:
15
home/default/.local/bin/musdl
Executable file
15
home/default/.local/bin/musdl
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
file="$(wl-paste)"
|
||||
directory="$HOME/Music"
|
||||
|
||||
case "$file" in
|
||||
*youtube.com*|*youtu.be*|*bandcamp.com*)
|
||||
notify-send "Downloading" "$file"
|
||||
cd $directory && yt-dlp --embed-metadata --embed-thumbnail -xc -f bestaudio/best --restrict-filenames "$file" && notify-send "Music added!" "$file is now saved to the music directory."
|
||||
;;
|
||||
*mp3|*flac|*opus|*mp3?source*)
|
||||
notify-send "⏳ Queuing $file..."
|
||||
cd $directory && curl -LO $file >/dev/null 2>&1 && notify-send "Music added!" "$file is now saved to the music directory." ;;
|
||||
esac
|
||||
exit 0
|
Reference in New Issue
Block a user