add forced to list of preserved track comments

This commit is contained in:
Lukáš Kucharczyk 2022-12-28 11:52:12 +01:00
parent 2e029290f9
commit 9278aea593
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
2 changed files with 6 additions and 1 deletions

View File

@ -22,7 +22,7 @@ for TRACK in $TRACKS; do
[[ $TRACK_NAME == "null" ]] && echo "has no title, skipping." && continue [[ $TRACK_NAME == "null" ]] && echo "has no title, skipping." && continue
echo -n "currently set to $TRACK_NAME... " echo -n "currently set to $TRACK_NAME... "
shopt -s nocasematch shopt -s nocasematch
[[ $TRACK_NAME =~ full|\stitles|comment|director|sdh|sign ]] && echo "includes whitelisted word, not deleting." && continue [[ $TRACK_NAME =~ full|\stitles|comment|director|sdh|sign|forced ]] && echo "includes whitelisted word, not deleting." && continue
echo -n "deleting... " echo -n "deleting... "
# mkvmerge --identify indexes tracks from 0, while mkvpropedit indexes from 1 # mkvmerge --identify indexes tracks from 0, while mkvpropedit indexes from 1
mkvpropedit "$FILE" --edit track:"$((TRACK+1))" --delete name &>/dev/null mkvpropedit "$FILE" --edit track:"$((TRACK+1))" --delete name &>/dev/null

5
watch-magnets.sh Executable file
View File

@ -0,0 +1,5 @@
# command -v notify-send 1>/dev/null || echo "The \"notify-send\" command is not available. Aborting." && exit 1
SAVEDIR=$(xdg-user-dir DOWNLOAD)
[[ "$1" =~ ^magnet ]] && notify-send -a "Clipboard Watcher" "Magnet URL copied to the clipboard."
aria2c -d "$SAVEDIR" --input-file <( echo "$1" ) --bt-metadata-only=true --bt-save-metadata=true
# TODO: spawn aria2c in a subshell in case a magnet link takes forever to load