diff --git a/delete_track_titles.sh b/delete_track_titles.sh index 6f2d4de..d4cbd39 100755 --- a/delete_track_titles.sh +++ b/delete_track_titles.sh @@ -22,7 +22,7 @@ for TRACK in $TRACKS; do [[ $TRACK_NAME == "null" ]] && echo "has no title, skipping." && continue echo -n "currently set to $TRACK_NAME... " 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... " # mkvmerge --identify indexes tracks from 0, while mkvpropedit indexes from 1 mkvpropedit "$FILE" --edit track:"$((TRACK+1))" --delete name &>/dev/null diff --git a/watch-magnets.sh b/watch-magnets.sh new file mode 100755 index 0000000..cb50f54 --- /dev/null +++ b/watch-magnets.sh @@ -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 \ No newline at end of file