Install Mylar Raspberry Pi for Usenet Torrent Comics

Raspberry-pi-mylar
Usenet has tons of content including comics. Developer evilhero has created the SickRage/CouchPotato for comic books so your downloading will be automated. Much like SickRage, Nzbdrone and CouchPotato, you can create a wishlist of all the comic books you want and Mylar will search your usenet indexers for the comic books and send them to your usenet downloader (Sabnzbd or NZBGet). It will also search some private torrent sites and send the .torrent files to your downloader’s watch directory. There are post processing scripts for both Sabnzbd and NZBGet so your comics will be nicely organized and named appropriately. You should also be able to configure the post-processing scripts to work with Transmission bit torrent but it may take additional work and effort.

If you are trying to figure out which hardware would work best for you, consider reading the Pi benchmarks.

Usenet Provider
Backbone
Retention
Speed
Connections
VPN
Monthly
Annual
UsenetServer
UsenetServer
2265
Unlimited
20
Yes
$10
$95.40
Usenetlink
Cloudgate
2000
100 Mbit
30
No
$15
$140
Astraweb
Astraweb
2264
Unlimited
20
No
$7.50
$96.00
UsenetBucket
XS News
1100
40 Mbit
25
No
€4.95
€60.00
Frugal
Blocknews
600
Unlimited
60
No
$4.99
$50.00

Install Mylar Raspberry Pi

This should take less than 5 minutes to complete.

Update repos first

sudo apt-get update

Upgrade them

sudo apt-get upgrade -y

Install dependencies for Mylar

sudo apt-get install python git -y

Install Mylar

We will get the latest and greatest development version of Mylar which evilhero updates more often and says is stable for a daily use.
Git clone Mylar into opt on RaspBian

sudo git clone https://github.com/evilhero/mylar -b development /opt/Mylar

Make pi the owner

sudo chown -R pi:pi /opt/Mylar

Try running Mylar

sudo python /opt/Mylar/Mylar.py -d

You can access Mylar at http://ip.address:8090/

Hit Ctrl+Z to stop the script if you are not back at the prompt

Create a comics directory, you choose where

mkdir -p /path/to/comics

Mylar Post-processing Scripts

We need to copy the post-processing scripts so Mylar can rename and organize your comics. Here are instructions for NZBGet and Sabnzbd.

Mylar and NZBGet

This guide assumes you followed my Install NZBGet Raspberry Pi guide and your scripts folder is ~/nzbget-13.0/scripts/

Copy these commands one by one

sudo cp /opt/Mylar/post-processing/autoProcessComics.cfg.sample ~/nzbget-13.0/scripts/autoProcessComics.cfg

sudo cp -r /opt/Mylar/post-processing/nzbget/. ~/nzbget-13.0/scripts/

sudo cp /opt/Mylar/post-processing/autoProcessComics.py ~/nzbget-13.0/scripts/

Mylar and Sabnzbd

If you have Sabnzbd installed you can copy the sabnzbd post-processing scripts

If you don’t have a scripts folder for Sabnzbd already you will need to create one

sudo mkdir ~/scripts

Now copy the scripts over to the directory, replace ~/scripts with your own scripts folder if it is different

sudo cp /opt/Mylar/post-processing/autoProcessComics.cfg.sample ~/scripts/autoProcessComics.cfg

sudo cp -r /opt/Mylar/post-processing/sabnzbd/. ~/scripts/

sudo cp /opt/Mylar/post-processing/autoProcessComics.py ~/scripts/

Autostart Mylar on Raspberry Pi

The init.d script is preferable but if you have problems with it you can use the Mylar Upstart script

Mylar init.d Script

Create the default Mylar configuration file which the init.d script reads

sudo nano /etc/default/mylar

Adjust these values as you see fit

MYLAR_USER=pi
MYLAR_HOME=/opt/Mylar
MYLAR_DATA=/opt/Mylar
MYLAR_PORT=8090

Ctrl+X, Y and Enter

Mylar has an init.d script included so let’s copy that

sudo cp /opt/Mylar/init-scripts/ubuntu.init.d /etc/init.d/mylar

Make the Mylar init.d script executable

sudo chmod +x /etc/init.d/mylar

Tell the system to use Mylar’s init.d defaults

sudo update-rc.d mylar defaults

Now you can start Mylar

sudo service mylar start

Mylar Upstart Script

Install upstart

sudo apt-get install upstart

Enter, Yes, do as I say! to continue installing upstart

Create the upstart file

sudo nano /etc/init/mylar.conf

Paste this code

Raspbmc Note: if you are running Raspbmc remove the setuid and setgid lines

#author "HTPCGuides.com"
#description "Upstart Script to run Mylar as a service on Ubuntu/Debian

#Set username for the process
setuid pi
setgid pi

start on runlevel [2345]

stop on runlevel [016]

#respawn

exec python /opt/Mylar/Mylar.py -d

Hit Ctrl+X, press Y and then Enter

Try and start the service

sudo service mylar start

The terminal should say

mylar start/running, process 1120

You may see this error, rebooting will solve it

start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

Rebooting the Pi will fix the above error

sudo reboot

Update Mylar

To update Mylar go into the Mylar folder

cd /opt/Mylar

Git pull the latest update

git pull

Configure Mylar and enjoy creating your watchlist for grabbing comics from usenet.

Note: You must specify a comics directory before you start adding comics