disable snap
This commit is contained in:
parent
ea02714d7f
commit
4f5f77eae8
8 changed files with 302 additions and 51 deletions
27
utils/dlm.sh
Executable file
27
utils/dlm.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Download files using yt-dlp -x
|
||||
|
||||
# Usage: dlm.sh [URL1 ... URLn]
|
||||
|
||||
# Dependencies: yt-dlp
|
||||
|
||||
# Check if yt-dlp is installed
|
||||
if ! command -v yt-dlp &> /dev/null; then
|
||||
echo "yt-dlp is not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if URLs are provided
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "No URLs provided"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Download files using yt-dlp -x and save them without the youtube id
|
||||
yt-dlp -x --audio-format mp3 --output "%(title)s.%(ext)s" "$@"
|
||||
|
||||
# Change the file's owner to 568:568
|
||||
# Change the file's permissions to 770
|
||||
sudo chown 568:568 ./*.mp3
|
||||
sudo chmod 770 ./*.mp3
|
||||
Loading…
Add table
Add a link
Reference in a new issue