CouchPotato
=====
CouchPotato (CP) is an automatic NZB and torrent downloader. You can keep a "movies I want"-list and it will search for NZBs/torrents of these movies every X hours.
Once a movie is found, it will send it to SABnzbd or download the torrent to a specified directory.
## Running from Source
CouchPotatoServer can be run from source. This will use *git* as updater, so make sure that is installed.
Windows, see [the CP forum ](http://couchpota.to/forum/showthread.php?tid=14 ) for more details:
* Install [Python 2.7 ](http://www.python.org/download/releases/2.7.3/ )
* Then install [PyWin32 2.7 ](http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/ ) and [GIT ](http://git-scm.com/ )
* If you come and ask on the forums 'why directory selection no work?', I will kill a kitten, also this is because you need PyWin32
* Open up `Git Bash` (or CMD) and go to the folder you want to install CP. Something like Program Files.
* Run `git clone https://github.com/RuudBurger/CouchPotatoServer.git` .
* You can now start CP via `CouchPotatoServer\CouchPotato.py` to start
* Your browser should open up, but if it doesn't go to `http://localhost:5050/`
OS X:
* If you're on Leopard (10.5) install Python 2.6+: [Python 2.6.5 ](http://www.python.org/download/releases/2.6.5/ )
* Install [GIT ](http://git-scm.com/ )
* Install [LXML ](http://lxml.de/installation.html ) for better/faster website scraping
* Open up `Terminal`
* Go to your App folder `cd /Applications`
* Run `git clone https://github.com/RuudBurger/CouchPotatoServer.git`
* Then do `python CouchPotatoServer/CouchPotato.py`
* Your browser should open up, but if it doesn't go to `http://localhost:5050/`
Linux:
* (Ubuntu / Debian) Install [GIT ](http://git-scm.com/ ) with `apt-get install git-core`
* (Fedora / CentOS) Install [GIT ](http://git-scm.com/ ) with `yum install git`
* Install [LXML ](http://lxml.de/installation.html ) for better/faster website scraping
* 'cd' to the folder of your choosing.
* Run `git clone https://github.com/RuudBurger/CouchPotatoServer.git`
* Then do `python CouchPotatoServer/CouchPotato.py` to start
* (Ubuntu / Debian) To run on boot copy the init script `sudo cp CouchPotatoServer/init/ubuntu /etc/init.d/couchpotato`
* (Ubuntu / Debian) Copy the default paths file `sudo cp CouchPotatoServer/init/ubuntu.default /etc/default/couchpotato`
* (Ubuntu / Debian) Change the paths inside the default file `sudo nano /etc/default/couchpotato`
* (Ubuntu / Debian) Make it executable `sudo chmod +x /etc/init.d/couchpotato`
* (Ubuntu / Debian) Add it to defaults `sudo update-rc.d couchpotato defaults`
* (systemd) To run on boot copy the systemd config `sudo cp CouchPotatoServer/init/couchpotato.fedora.service /etc/systemd/system/couchpotato.service`
* (systemd) Update the systemd config file with your user and path to CouchPotato.py
* (systemd) Enable it at boot with `sudo systemctl enable couchpotato`
* Open your browser and go to `http://localhost:5050/`
Docker:
* You can use [linuxserver.io ](https://github.com/linuxserver/docker-couchpotato ) or [razorgirl's ](https://github.com/razorgirl/docker-couchpotato ) to quickly build your own isolated app container. It's based on the Linux instructions above. For more info about Docker check out the [official website ](https://www.docker.com ).
FreeBSD:
* Become root with `su`
* Update your repo catalog `pkg update`
* Install required tools `pkg install python py27-sqlite3 fpc-libcurl docbook-xml git-lite`
* For default install location and running as root `cd /usr/local`
Update README.md
Python meta-package handles the symlinks python to python2 to python2.7 in /usr/local/bin where user-installed software goes. Unfortunately that isn't in startup's $PATH for root, so the startup script fails. Symlinking python into the base system isn't great and will get blown away on system update, but appears to be the "best" worst way to make the startup script work for root out of the following options:
1) changing shebang in CouchPotato.py is a little brazen
2) append $PATH in the startup script, apparently bad form
3) specify /usr/local/bin/python as $command... also apparently bad form
If using non-root user, /usr/local/bin is in $PATH. I'm hoping that by mentioning "running as root" a few times, the instructions are clear enough for people who understand permissions, yet simple enough for people who don't care or are in a jail().
Note that per rc.subr(8) and a quick test, $command_interpreter isn't actually used to execute $command, just to find the process.
References:
https://github.com/RuudBurger/CouchPotatoServer/pull/1226
https://www.freebsd.org/cgi/man.cgi?query=rc.subr&sektion=8
https://forums.freebsd.org/threads/rc_run_command-and-command_interpreter.27786/
Tested on FreeBSD 10.1-RELEASE amd64 as root, non-root with appropriate permissions, service start/status/stop, shutdown, reboot.
10 years ago
* If running as root, expects python here `ln -s /usr/local/bin/python /usr/bin/python`
* Run `git clone https://github.com/RuudBurger/CouchPotatoServer.git`
* Copy the startup script `cp CouchPotatoServer/init/freebsd /usr/local/etc/rc.d/couchpotato`
* Make startup script executable `chmod 555 /usr/local/etc/rc.d/couchpotato`
* Add startup to boot `echo 'couchpotato_enable="YES"' >> /etc/rc.conf`
* Read the options at the top of `more /usr/local/etc/rc.d/couchpotato`
* If not default install, specify options with startup flags in `ee /etc/rc.conf`
* Finally, `service couchpotato start`
* Open your browser and go to: `http://server:5050/`