Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save XxUnkn0wnxX/bf3d848232f4a71b6556 to your computer and use it in GitHub Desktop.
Save XxUnkn0wnxX/bf3d848232f4a71b6556 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/bash
source ~/.bash_profile
python ~/"Apps/SickRage/contrib/nzbToMedia/nzbToSickBeard.py" "$@"
# this how the script should look like only the 1st 3 lines. edit script with path to ur Locations
# it is very important "$@" is set last
# be sure you have /usr/local/bin on top in /etc/paths & you have a working .bash_profile in your Home Directory
# with all the proper paths set for Homebrew use,
# only python via brew installed all other copys removed (dont touch the one that Belongs in System)
# #!/usr/local/bin/bash Use #!/usr/bin/bash at the start of the script if you are not using the brewed version.
# save the script as nzbTomedia.sh, open terminal type in chmod 777 then drag the file onto the terminal window and hit enter.
# now place in the folder where you keep all your scipts for SabNZB. & go back to category’s and change nzbToSickBeard.py to your script and save.
@XxUnkn0wnxX
Copy link
Author

my setup:

@XxUnkn0wnxX
Copy link
Author

would recommend installing everything via brew including python..

in the script i am using brewed ver of bash, source ~/.bash_profile (loads .bash_profile from my home Dir VERY IMPORTANT, be sure i have this set up right )
python ~/"Apps/SickRage/contrib/nzbToMedia/nzbToSickBeard.py" "$@" (loads up the script)

@XxUnkn0wnxX
Copy link
Author

your .bash_profile should look something like this or similar:

export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/lib:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/local/opt/coreutils/libexec/gnubin
export PATH=/usr/local/sbin:$PATH
export HOMEBREW_GITHUB_API_TOKEN=
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"export PATH="/usr/local/sbin:$PATH"

where "HOMEBREW_GITHUB_API_TOKEN=" is your github API token you will need this for brew to work without issues.

if you set up brew correctly your /etc/paths should look like this:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

very important that /usr/local/bin is on top

and for SR Post Processing if you want it to unpack be sure you have installed these via brew:
p7zip
unzip
unrar
also helps NZBtoMedia

as for NZBtoMedia Config:

for General i have:
ffmpeg_path = /usr/local/bin/ (optional but if you want that feature enabled install ffmpeg via brew 1st)

in the [SickBeard] section

where "[[tv]]" is copy all the settings and paste it underneath like so:

where [[sickrage]] is thats the name of my category set here:

see how i have sickrage set to sickrage that is what i have set in the nzbtomedia config file
and for the Folder/Path call it what ever you want, but i keep it the same as my Category name.
and no need to type in the full path as by default it will make that folder in the door DIR of where your non-caragorised downloads go to.
and: Relative folders are based on: /Users/Admin/Downloads/NZB Downloads/Completed
is the main location for non categorised downloads

and for:
[Nzb]
###### clientAgent - Supported clients: sabnzbd, nzbget
clientAgent = sabnzbd
###### SabNZBD (You must edit this if your using nzbToMedia.py with SabNZBD)
sabnzbd_host = localhost
sabnzbd_port = 8080
sabnzbd_apikey =
###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode.
default_downloadDirectory = /Users/Admin/Downloads/NZB Downloads/Completed

make sure you have Set ur Sab Full API Key: for sabnzbd_apikey =

and for SR settings:

Categories should match what you have setup in nzbtomedia config & SAB Category settings

@XxUnkn0wnxX
Copy link
Author

XxUnkn0wnxX commented Sep 14, 2018

2018 Update: SickChill LaunchAgent macOS [Runs On Boot] - Use this updated ver of getting things to run.

I utilise Paths.plist & /etc/paths to run nzbtomedia fine without any work around scripts.

i cannot stress enough, use this new method 1st before referring to these old guides.

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