Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \#!/bin/bash
- pvr=$1
- title=$2
- downloadUrl=$3
- apiKey=$4
- date=$(date -u +"%Y-%m-%d %H:%M:%SZ")
- indexer=$5
- apiUrl="null"
- post\_release() {
- {
- /usr/bin/curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Api-Key: $apiKey" -X POST -d "$1" $apiUrl
- } &>/dev/null
- }
- get\_api\_url() {
- if \[ -z "$pvr" \]; then
- echo 'No PVR set'
- exit
- fi
- if \[ "$pvr" == "lidarr" \]; then
- apiUrl="http://localhost:8686/api/v1/release/push"
- elif \[ "$pvr" == "radarr" \]; then
- apiUrl="http://127.0.0.1:7878/api/release/push"
- elif \[ "$pvr" == "sonarr" \]; then
- apiUrl="http://127.0.0.1:8989/api/release/push"
- fi
- }
- get\_api\_url
- if \[ -z "$indexer" \]; then
- post\_release '{"title":"'"$title"'","downloadUrl":"'"$downloadUrl"'","protocol":"torrent","publishDate":"'"$date"'"}'
- exit
- fi
- post\_release '{"title":"'"$title"'","downloadUrl":"'"$downloadUrl"'","protocol":"torrent","publishDate":"'"$date"'","indexer":"'"$indexer"'"}'
- 18:10:18-!-
- Matched Four Corners S60E10 Amazon-What They Know About Us 720p HDTV x264-CBFM in TV/x264 (All IPT to Sonarr), IPTorrents
- 18:10:18-!-
- Started command: '/home/seedit4me/iptv/autodl-curl-sonarr.sh', args: '"sonarr" "Four Corners S60E10 Amazon-What They Know About Us 720p HDTV x264-CBFM" "https://www.iptorrents.com/download.php/3842134/Four%20Corners%20S60E10%20Amazon-What%20They%20Know%20About%20Us%20720p%20HDTV%20x264-CBFM.torrent?torrent\_pass=******" API\_KEY\_CENSORED' Four Corners S60E10 Amazon-What They Know About Us 720p HDTV x264-CBFM, IPTorrents, total time 0.056 seconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement