Difference between revisions of "Setup sabnzbd"

From WikiDLXTV
Jump to: navigation, search
Line 13: Line 13:
  
  
  wget http://sourceforge.net/projects/sabnzbdplus/files/sabnzbdplus/sabnzbd-0.6.8/SABnzbd-0.6.8-src.tar.gz/download
+
wget http://sourceforge.net/projects/sabnzbdplus/files/sabnzbdplus/sabnzbd-0.6.8/SABnzbd-0.6.8-src.tar.gz/download
  
 
5) I recommend installing mc via ipkg as well to deal with the unpacking and stuff.  
 
5) I recommend installing mc via ipkg as well to deal with the unpacking and stuff.  
Line 19: Line 19:
 
6) Before getting SABnzbdplus to listen on your device's local ip, we need a config file called 'sabnzbd.ini'. To get this generated automatically you have to run SABnzbdplus once. Type in the following to do so and adjust according to your version of python.
 
6) Before getting SABnzbdplus to listen on your device's local ip, we need a config file called 'sabnzbd.ini'. To get this generated automatically you have to run SABnzbdplus once. Type in the following to do so and adjust according to your version of python.
  
  /opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini
+
/opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini
  
 
Usually we'd prefer SABnzbdplus to be run in daemon mode (-d), but since this is the first time launching, we can check to see if SABnzbdplus starts alright. If it does (that is if no errors occur), just quit/exit SABnzdplus again and navigate to /opt/share/SABnzbd/ using mc, locate sabnzbd.ini, and edit the file (F4). Scroll down to "host" and change 'localhost' to '0.0.0.0'. Save the file (F2).
 
Usually we'd prefer SABnzbdplus to be run in daemon mode (-d), but since this is the first time launching, we can check to see if SABnzbdplus starts alright. If it does (that is if no errors occur), just quit/exit SABnzdplus again and navigate to /opt/share/SABnzbd/ using mc, locate sabnzbd.ini, and edit the file (F4). Scroll down to "host" and change 'localhost' to '0.0.0.0'. Save the file (F2).
Line 25: Line 25:
 
7) Now SABnzbdplus should work. Start it again using the -d mode like this:
 
7) Now SABnzbdplus should work. Start it again using the -d mode like this:
  
  /opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d
+
/opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d
  
 
8) Try to reach SABnzdplus from your PC or Mac on: [http://WDTVIP:8080/sabnzbd/]. If all works well, you should now be met with a configuration wizard.
 
8) Try to reach SABnzdplus from your PC or Mac on: [http://WDTVIP:8080/sabnzbd/]. If all works well, you should now be met with a configuration wizard.
Line 33: Line 33:
 
If this was a success, you might be interested in getting SABnzdplus to launch automatically at boot. This is done by creating a script and placing it in /opt/etc/init.d/. Here's how my script looks. Adjust according to IP, paths, user/pass etc.  
 
If this was a success, you might be interested in getting SABnzdplus to launch automatically at boot. This is done by creating a script and placing it in /opt/etc/init.d/. Here's how my script looks. Adjust according to IP, paths, user/pass etc.  
  
  #!/opt/bin/bash
+
#!/opt/bin/bash
 
    
 
    
  case "$1" in
+
case "$1" in
  start)
+
start)
    echo "Starting SABnzbd."
+
  echo "Starting SABnzbd."
    /opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d
+
  /opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d
  stop)
+
stop)
  echo "Shutting down SABnzbd."
+
echo "Shutting down SABnzbd."
  wget -q --delete-after "]"
+
wget -q --delete-after "]"
  ;;
+
;;
  *)
+
*)
  echo "Usage: $0 {start|stop}"
+
echo "Usage: $0 {start|stop}"
  exit 1
+
exit 1
  esac
+
esac
 
    
 
    
  exit 0
+
exit 0
  
  
 
Just save it as "S##SABnzbd", the # being a numeric value between 0 and 9 in accordance with WDLXTV's execution order (thanks b-rad). For instance, the name "S89SABnzbd" works for me. Remember to place the file in /opt/etc/init.d/, locate it using telnet/ssh and use the following command to get it executable:
 
Just save it as "S##SABnzbd", the # being a numeric value between 0 and 9 in accordance with WDLXTV's execution order (thanks b-rad). For instance, the name "S89SABnzbd" works for me. Remember to place the file in /opt/etc/init.d/, locate it using telnet/ssh and use the following command to get it executable:
  
  chmod +x sabnzdplus
+
chmod +x sabnzdplus
  
  
Line 76: Line 76:
 
If you get "Segmentation fault" try the following:
 
If you get "Segmentation fault" try the following:
 
Start sabnzb with "-v" (verbose).  
 
Start sabnzb with "-v" (verbose).  
  /opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d -v
+
/opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d -v
 
Then you can see just the lib that is causing the Error. Should be perl/lib/xxxx.so. Just rename the file and start sabnzbd again
 
Then you can see just the lib that is causing the Error. Should be perl/lib/xxxx.so. Just rename the file and start sabnzbd again

Revision as of 12:18, 8 September 2011

SABnzbd is an Open Source Binary Newsreader written in Python.


Installation

1) Get b-rad's opt.bin and place it on your attached USB-drive http://b-rad.cc/binaries/opt.bin.tgz

2) Use telnet or ssh to connect to the device, and type: 'ipkg update' and 'ipkg install sabnzbdplus' (without the quotes)

3) Make sure all dependencies are downloaded and installed correctly. These include python, cheetah, cherrypy, bzip2, unrar among others. If not, install them manually. Use 'ipkg list' and 'ipkg list_installed' for assistance if needed.

4) Even though you've already got SABnzbdplus downloaded and even installed, I recommend downloading SABnzbdplus via Sourceforge using the 'wget' command and then unpacking manually into /opt/share/SABnzbdplus and discard the existing folder. For some reason this way has always worked better for me. So basically what you need to do is to navigate to the /opt/share/ folder and use this command to get the newest version.


wget http://sourceforge.net/projects/sabnzbdplus/files/sabnzbdplus/sabnzbd-0.6.8/SABnzbd-0.6.8-src.tar.gz/download

5) I recommend installing mc via ipkg as well to deal with the unpacking and stuff.

6) Before getting SABnzbdplus to listen on your device's local ip, we need a config file called 'sabnzbd.ini'. To get this generated automatically you have to run SABnzbdplus once. Type in the following to do so and adjust according to your version of python.

/opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini

Usually we'd prefer SABnzbdplus to be run in daemon mode (-d), but since this is the first time launching, we can check to see if SABnzbdplus starts alright. If it does (that is if no errors occur), just quit/exit SABnzdplus again and navigate to /opt/share/SABnzbd/ using mc, locate sabnzbd.ini, and edit the file (F4). Scroll down to "host" and change 'localhost' to '0.0.0.0'. Save the file (F2).

7) Now SABnzbdplus should work. Start it again using the -d mode like this:

/opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d

8) Try to reach SABnzdplus from your PC or Mac on: [1]. If all works well, you should now be met with a configuration wizard.

Autostart

If this was a success, you might be interested in getting SABnzdplus to launch automatically at boot. This is done by creating a script and placing it in /opt/etc/init.d/. Here's how my script looks. Adjust according to IP, paths, user/pass etc.

#!/opt/bin/bash
 
case "$1" in
start)
  echo "Starting SABnzbd."
  /opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d
stop)
echo "Shutting down SABnzbd."
wget -q --delete-after "]"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
 
exit 0


Just save it as "S##SABnzbd", the # being a numeric value between 0 and 9 in accordance with WDLXTV's execution order (thanks b-rad). For instance, the name "S89SABnzbd" works for me. Remember to place the file in /opt/etc/init.d/, locate it using telnet/ssh and use the following command to get it executable:

chmod +x sabnzdplus


Now everything left for you to do is configuring SABnzdplus. Enjoy

/chiptune

taken from: [2]

High-Speed Tweaks

Set the article cache in Config -> General. This will keep articles in memory and not write them to disk (which is slower). Try 50M or 70M (the M denotes megabytes and is required). Keep in mind that wdtv has not much free memory!

Make sure python-yenc is installed (yenc-0.3.tar.gz or higher). This will speed up decoding as it will use C code instead of python code. The logging will say at startup whether this module has been installed. It will be installed with python2.5. It seems there is no package for python2.6.

Lower your connection count in Config -> Servers. Good values are 3-6 connections.

It seems like max speed with sabnzbd on wdtv is around 2 Mbit/s!

Troubleshooting

If you get "Segmentation fault" try the following: Start sabnzb with "-v" (verbose).

/opt/bin/python2.6 /opt/share/SABnzbd/SABnzbd.py -f /opt/share/SABnzbd/sabnzbd.ini -d -v

Then you can see just the lib that is causing the Error. Should be perl/lib/xxxx.so. Just rename the file and start sabnzbd again