Compare commits

..

3 Commits

Author SHA1 Message Date
9d9f5d34f8 channelArchive.sh
dot-source it, then for example, ytdlp '/mnt/gusion/adam/videos/Preserve-evergreen/Rhystic Studies/' 'Rhystic Studies' https://www.youtube.com/@RhysticStudies/videos 0
2023-11-14 15:06:59 -05:00
3ecbc3af7f bypass trash, a necessary feature that has been removed in linux desktop environments 2023-11-14 15:06:00 -05:00
faa1bf99ed also convert mkv 2023-11-14 15:04:55 -05:00
3 changed files with 46 additions and 0 deletions

19
bash/bypasstrash.sh Executable file
View File

@ -0,0 +1,19 @@
#/bin/bash
#thanks, bewilderex63. https://unix.stackexchange.com/questions/51840/how-to-disable-trash-can-in-thunar-xfce
# Once at the start for good measure
rm -rf .local/share/Trash/files/*
while [ true ]
do
inotifywait ~/.local/share/Trash/files
# Don't get stuck in a CPU-melting loop if something goes wrong
if [ $? -ne 0 ]
then
exit $?
fi
# Good riddance
rm -rf .local/share/Trash/files/*
done

22
bash/channelArchive.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
. /etc/profile
. ~/.bashrc
function ytdlp(){
sponsorblock=""
if [ $4 -eq 1 ]
then
sponsorblock="--no-sponsorblock"
fi
pushd "$1"
yt-dlp --output "%(upload_date)s - %(title)s - [%(id)s].%(ext)s" \
--format "[ext=mp4]+ba/best" \
--download-archive "done.txt" \
--min-sleep-interval 0 --max-sleep-interval 10 \
$sponsorblock \
--exec "vidpath=\$(basename {}); vidpath=\$(echo \$vidpath | sed 's/^[0-9]\{8\} - //' | sed 's/- \[[a-zA-Z0-9]\+\]\.mp4//'); textmsg=\"archived video from $2: \$vidpath\"; /home/adam/bin/miscChat.sh \"\$textmsg\";" \
$3
popd
}

View File

@ -13,6 +13,11 @@ do
ffmpeg -i "$file" "$file.mp4"
#rm "$file"
done
for file in *.mkv
do
ffmpeg -i "$file" "$file.mp4"
#rm "$file"
done
if [ $(wc -l < "$@") -eq $(wc -l < done.txt) ]
then