Skip to content

Instantly share code, notes, and snippets.

@hvmonteiro
Last active March 29, 2020 20:25
Show Gist options
  • Save hvmonteiro/36f6c38cd03761b87d4ddf5ba7a8e13f to your computer and use it in GitHub Desktop.
Save hvmonteiro/36f6c38cd03761b87d4ddf5ba7a8e13f to your computer and use it in GitHub Desktop.
Quick dirty script to download showrss.info list and send it to transmission torrent
#!/bin/bash
USERID="12345"
TRACKERS_FILE="/tmp/showrss.info"
TRANSMISSION_BIN="/storage/.kodi/addons/service.downloadmanager.transmission/bin/transmission-remote"
TRACKERS_LIBFILE="/var/media/storage/backups/get-showrss-info.data"
curl -s 'http://showrss.info/user/${USERID}.rss?magnets=true&namespaces=true&name=null&quality=null&re=null' | grep -o '<enclosure url="[^"]*' | grep -o '[^"]*$' > "$TRACKERS_FILE"
#sed 's/&/\\&/g;s/;/\\;/g'
touch "$TRACKERS_LIBFILE"
while IFS= read -r line; do
fgrep -q "$line" "$TRACKERS_LIBFILE"
if [ $? -ne 0 ]; then
echo "Adding '$line' ..."
"$TRANSMISSION_BIN" -a "$line"
if [ $? -eq 0 ]; then
echo "$line" >> "$TRACKERS_LIBFILE"
else
echo "Error adding tracker!"
fi
fi
done < "$TRACKERS_FILE"
exit 0
@hvmonteiro
Copy link
Author

It was written to be used in XBMC/KODI, but works wherever there's a bash shell and curl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment