mirror of
https://github.com/zoriya/snow.git
synced 2026-08-15 02:24:52 +00:00
13 lines
411 B
Bash
13 lines
411 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
rsstail -f '{title};{link}\n' "$URL" | while IFS=';' read -r title link; do
|
|
name=$(guessit "$title" -P title | tr -d "[:punct:]")
|
|
|
|
# shellcheck disable=SC2012
|
|
if ls /medias | tr -d "[:punct:]" | grep -qix "$name"; then
|
|
echo "Adding $title (match with $name)"
|
|
transmission-remote "$TRURL" --auth "$TRUSER:$TRPASS" -a "$link" -w "/medias/$name"
|
|
fi
|
|
done
|