Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
NZBget on the PCH/NMT Howto and FAQ
08-20-2008, 10:24 AM (This post was last modified: 09-02-2008 09:03 PM by Philos.)
Post: #1
NZBget on the PCH/NMT Howto and FAQ
Disclaimer: Usenet is a good source of legal material to play on your PCH, however it is also misused by uploading illegal and copyrighted material. You should avoid using NZBget to download these materials as this is illegal in most country’s including the USA.

NZBget on the PCH PART 1 Setting up NZBget

NZBGet is a binary news grabber, which downloads files from usenet based
on information given in nzb-files.

For information on Usenet and nzb files go here:
Usenet: http://www.binaries4all.com/beginners/
NZB: http://www.binaries4all.com/nzb/index.php

To run NZBget you need to have access to a usenet provider. It is possible that your ISP has a news server but if not you can also have a separate usenet account on a “pay-server”
Usenet account vary in price from a few $ to 35$ a month depending on your needs.
There are many usenet servers to choose from. Google is your friend.

Once you have a usenet account you can configure NZBget. Your usenet provider will provide you with the information needed.

1. UserID and Password
2. Newsservername and port to connect (normally 119)
3. # of concurrent connections allowed.

The 0.4.1 build of NZBget doesn’t use of SSL; the 0.5.0 version is in testing and does use SSL if your news server provides that. (If you don’t understand, Google) The PCH uses the stable 0.4.1 version of NZBget so SSL is not yet an option. It is not said that the 0.5.0 version will ever be ported by Syabas to the PCH, that is totally up to them.

Now to configure NZBget on the PCH.

In the root of your hard disk you will find a folder called .nzbget (if your don’t see the folder, check if the Usenet-service is started under Setup -> NMT Applications)
Inside that folder you will find 2 files: nzbget.conf and unpak.sh

You can open nzbget.conf with a text editor.

Once you have opened the nzbget.conf file you only need to fill in the information you got from your Usenet provider here:
Code:
# Host-name of news server
server1.host=news.yourserver.com <- Put the server name behind the =
# Port to connect to (default 119 if not specified)
server1.port=119 <- change the port if it is different from 119
# Username to use for authentication
server1.username=USERNAME <- your username
# Password to use for authentication
server1.password=PASSWORD <- your password
# Maximal number of simultaneous connections to this server
server1.connections=4 <- the maximum of concurrent connection (or less)

Now save the file to the same place and reboot** your PCH to activate the changes and you are ready to go
**You can either stop and restart the usenet service in the NMT services menu or reboot by pulling the plug or press on/off eject
NZBget on the PCH PART 2 working with NZBget

Working with NZBget is very straightforward.
Connect to the webgui from a browser via http://ip.of.your.pch:8066
So if your PCH has ip address 192.168.1.100 you type http://192.168.1.100:8066 in your favourite web browser.

First you have to log in:
Userid: nmt
Password: 1234
You will see the NZBgetweb webgui.

[Image: nzbgetweb.jpg]


To add a download just upload your NZB file by clicking the “choose” button and browse to the nzb file.
Then click the “upload file” button and off you go.
The file will be uploaded to PCH and added to download queue. Don’t confuse it with uploading to news server. None files will be uploaded to Internet.
After uploading the nzb file it will take a minute before the program starts to download there is a safety interval of 1 minute so NZBGet wont start downloading while the NZB is not completely on the harddisk (you can adjust the safety interval in nzbget.conf, option “NzbDirFileAge”).
You can follow the progress of the download via the webgui or just let it download.

After a download is finished and the nzb file set contains par2 files your download will be checked and repaired if necessary. After that the unpack script in .nzbget will be called and your download will be unrarred.
The unpack script of the PCH is able to unrar rar packed files and also unrar rar’s inside of rar’s.
More functionality is possible with a different script witch I will post in the next part.

With the GUI you will be able to pause/delete and move your downloads. If you need something quick and it is halfway your download queue you can move it to the top of the queue with the buttons in front of the file set.

If you want to pause all downloads for a reason you can do that via pause on the bottom left of the webgui, and restart it again with resume.

All downloads will be downloaded and unpacked to the folder Download on your hard disk and will be in a folder that has the same name as the NZB file you uploaded, so be sure to give your nzb’s descriptive names.
NZBget on the PCH PART 3 tips tricks and f.a.q.

Uploading multiple NZB’s
Uploading nzb’s is also possible by putting them in the nzb folder. The nzb folder is located on your hard disk in .NZBGet\nzb
If you have many nzb’s you want to have downloaded it is easier to just copy and paste them to that folder.

Automating NZB uploads
If you want your PCH as your nzb download station there is a nice tool you can install on your windows pc that will upload the nzb’s to your pch when you open them from your pc.
It is written by one of our own users Balder1978 and has the strange name “PCH Torrent uploader” Big Grin
http://www.networkedmediatank.com/showth...p?tid=4103
To use this make sure that you have ftp enabled because it will upload the files via ftp to the nzb folder.

Using NZBGet via internet
You can open up port 8066 on your router so that you can monitor your downloads via internet.
Opening ftp to internet is also possible so you could use the “PCH Torrent uploader” via internet but be aware that this could be a potential security risk, your nzbget.conf file contains your user id and password for your news server in plain text so if someone breached your security (ftpuser/1234 is not very secure) you could lose your account to some hacker.

ADVANCED: Changing username/password for web-access
You can do this by editing the file “settings.php5” in directory “/mnt/syb8634/nzbgetweb” . The problem is that you need telnet-access to PCH. Please see forum for tips on getting telnet to work on PCH.

Using another unrar script
The standard script that is inside the firmware enables you to unrar files. There are several scripts that you can find around the internet that do the same.
A few of the beta testers and the developer of NZBget made a new script that does the same job but can also join ts files.
Open up the unpack script in .nzbget and overwrite everything with this code.
Make sure you use a UNIX editor for this otherwise it wont work.
Enable the option DeleteRarFiles if you are brave enough
Edit: An even better and much more advanced script can be found here:
http://www.networkedmediatank.com/showth...374&page=1

Code:
#!/bin/sh
#
# NZBGet post-process script
# Script will unrar downloaded rar files, join ts-files and rename img-files to iso.
#
# Copyright (C) 2008 Peter Roubos <peterroubos @ hotmail.com>
# Copyright (C) 2008 Otmar Werner
# Copyright (C) 2008 Andrei Prygounkov <hugbug @ users.sourceforge.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#

#######################    Settings section     #######################

# Set the full path to unrar if it is not in your PATH
UnrarCmd=/mnt/syb8634/bin/unrar

# Delete rar-files after unpacking (1, 0)
DeleteRarFiles=0

# Joint TS-files (1, 0)
JoinTS=1

# Rename img-files to iso (1, 0)
RenameIMG=0

####################### End of settings section #######################


# Parameters passed to script by nzbget:
#  1 - path to destination dir, where downloaded files are located;
#  2 - name of nzb-file processed;
#  3 - name of par-file processed (if par-checked) or empty string (if not);
#  4 - result of par-check:
#      0 - not checked: par-check disabled or nzb-file does not contain any
#          par-files;
#      1 - checked and failed to repair;
#      2 - checked and sucessfully repaired;
#      3 - checked and can be repaired but repair is disabled;
#  5 - state of nzb-job:
#      0 - there are more collections in this nzb-file queued;
#      1 - this was the last collection in nzb-file;
#  6 - indication of failed par-jobs for current nzb-file:
#      0 - no failed par-jobs;
#      1 - current par-job or any of the previous par-jobs for the
#          same nzb-files failed;

DownloadDir="$1"  
NzbFile="$2"
ParCheck=$4
NzbState=$5  
ParFail=$6

# Check if all is downloaded and repaired
if [ "$#" -lt 6 ]
then
    echo "*** NZBGet post-process script ***"
    echo "This script is supposed to be called from nzbget."
    exit
fi

echo "[INFO] Unpack: Post-process script successfully started"

# Check if all is downloaded and repaired
if [ ! "$NzbState" -eq 1 ]
then
    echo "[INFO] Unpack: Not the last collection in nzb-file, exiting"
    exit
fi
if [ ! "$ParCheck" -eq 2 ]
then
    echo "[WARNING] Unpack: Par-check failed or disabled, exiting"
    exit
fi
if [ ! "$ParFail" -eq 0 ]
then
    echo "[WARNING] Unpack: Previous par-check failed, exiting"
    exit
fi

# All OK, processing the files
cd "$DownloadDir"

# Make a temporary directory to store the unrarred files
mkdir extracted
  
# Remove the Par files
echo "[INFO] Unpack: Deleting par2-files"
rm *.[pP][aA][rR]2
  
# Unrar the files (if any) to the temporary directory, if there are no rar files this will do nothing
if (ls *.rar >/dev/null)
then
    echo "[INFO] Unpack: Unraring"
    $UnrarCmd x -y -p- -o+ "*.rar"  ./extracted/
fi

if [ $JoinTS -eq 1 ]
then
    # Join any split .ts files if they are named xxxx.0000.ts xxxx.0001.ts
    # They will be joined together to a file called xxxx.0001.ts
    if (ls *.ts >/dev/null)
    then
        echo "[INFO] Unpack: Joining ts-files"
        tsname=`find . -name "*0001.ts" |awk -F/ '{print $NF}'`
        cat *0???.ts > ./extracted/$tsname
    fi  
  
    # Remove all the split .ts files
    echo "[INFO] Unpack: Deleting source ts-files"
    rm *0???.ts
fi
  
# Remove the rar files
if [ $DeleteRarFiles -eq 1 ]
then  
    echo "[INFO] Unpack: Deleting rar-files"
    rm *.r[0-9][0-9]
    rm *.rar
    rm *.s[0-9][0-9]
fi
  
# Go to the temp directory and try to unrar again.  
# If there are any rars inside the extracted rars then these will no also be unrarred
cd extracted
if (ls *.rar >/dev/null)
then
    echo "[INFO] Unpack: Calling unrar (second pass)"
    $UnrarCmd x -y -p- -o+ "*.rar"

    # Delete the Rar files
    if [ $DeleteRarFiles -eq 1 ]
    then  
        echo "[INFO] Unpack: Deleting rar-files (second pass)"
        rm *.r[0-9][0-9]
        rm *.rar
        rm *.s[0-9][0-9]
    fi
fi
  
# Move everything back to the Download folder
mv * ..
cd ..
  
# Clean up the temp folder
echo "[INFO] Unpack: Cleaning up"
rmdir extracted
chmod -R a+rw .
rm *.nzb
rm *.1
rm .sfv
rm _brokenlog.txt

if [ $RenameIMG -eq 1 ]
then
# Rename img file to iso
# It will be renamed to .img.iso so you can see that it has been renamed
    if (ls *.img >/dev/null)
    then
        echo "[INFO] Unpack: Renaming img-files to iso"
        imgname=`find . -name "*.img" |awk -F/ '{print $NF}'`
        mv $imgname $imgname.iso
    fi  
fi

More then one file sets in one NZB

NZBget can handle more then one file set in one NZB. It will download and check the pars and run the unpack script after every file set.
The upak.sh script (both the original and the one posted here) will check first if all sets in the nzb where already downloaded, only after the last set was downloaded the script will unpack everything.

Are there things that NZBget can’t handle?

Yes, password protected files are not handled. As are Zip 7z arj and other files.
With the script that is posted here it can handle rarred or double rarred files. Split ts files and most of the time split avi’s e.g.: avi.001 avi.002 etc. The unpack script will handle the rar files and the ts files most of the split avi files will be joined by par checking.

Where do I go when I have questions?

With questions about NZBget just post your questions to the forum.
With specific questions about the unpack script post to the forum or PM me.
With specific questions about NZBget functionality post to the forum. The developer of NZBget is also reading these forums.

I tried to download something but it doesn’t get unpacked.

First if you still have the files download everything from your PCH to your PC and check if you are able to unrar it there. Check with quickpar if the file set was complete or not. If all of that is true then PM me, I will give you my e-mail address so you can send me the NZB. I will check it and see if I can come up with a solution. (I have a 20+ Mbit line so most of the downloads will be quick enough, don’t send me 8Gb+ nzb’s please)

Questions? Post them.

Edit:
If you want to use the latest NZBget client and the latest webgui with SSL support and other nice features and know how to use telnet follow this link for a good HowTo:
http://www.networkedmediatank.com/showth...p?tid=7538

C200 1.5 TB Hdd HDMI
A200 Metal apps on USB stick
TV: Samsung LE40C650

Visit my Personal Website
Visit this user's website Find all posts by this user
[+] 1 user says Thank You to Philos for this post
08-20-2008, 02:14 PM
Post: #2
RE: NZBget on the PCH/NMT Howto and FAQ
Forgive me for asking such an obvious question, but when was this implemented? Do I need to update my firmware to enable NZBget? If so, is this firware available today?
Find all posts by this user
08-20-2008, 02:16 PM
Post: #3
RE: NZBget on the PCH/NMT Howto and FAQ
It's in latest beta, if RC5 passes testing it might be out this weekend Big Grin
Find all posts by this user
08-20-2008, 03:01 PM
Post: #4
RE: NZBget on the PCH/NMT Howto and FAQ
WOW COOL thanks, although it will be in the next firmware, I am going to install this this evening.

Is this exact the same as will be in the next firmware?

C-200 + A-410 + Samsung 46F8500 +SONY STR-DB 870 QS

C-200 Dutch manual: download it here.
Find all posts by this user
08-20-2008, 03:10 PM
Post: #5
RE: NZBget on the PCH/NMT Howto and FAQ
the manual was posted already because istar, hdx already released the firmware as final.
the usenet support will be avaible on pch with the next final which should hopefully be out on Friday to the public Wink

regards werner
Find all posts by this user
08-20-2008, 03:12 PM (This post was last modified: 08-20-2008 03:13 PM by Philos.)
Post: #6
RE: NZBget on the PCH/NMT Howto and FAQ
(08-20-2008 03:01 PM)RedHat Wrote:  WOW COOL thanks, although it will be in the next firmware, I am going to install this this evening.

Is this exact the same as will be in the next firmware?

Yes. And with a little luck the new firmware will be out this weekend.
As 2 other NMT's allready have a new firmware with nzbget (the current Beta) I decided to release the documentation a bit early.

C200 1.5 TB Hdd HDMI
A200 Metal apps on USB stick
TV: Samsung LE40C650

Visit my Personal Website
Visit this user's website Find all posts by this user
08-20-2008, 03:15 PM (This post was last modified: 08-20-2008 03:15 PM by RedHat.)
Post: #7
RE: NZBget on the PCH/NMT Howto and FAQ
uhm where to get the files? Sourceforge gives me windows stuff or the source code......

Or.... only documentation?

C-200 + A-410 + Samsung 46F8500 +SONY STR-DB 870 QS

C-200 Dutch manual: download it here.
Find all posts by this user
08-20-2008, 03:18 PM
Post: #8
RE: NZBget on the PCH/NMT Howto and FAQ
you cant run it already as already said this function will come with the next final firmware + apps release which should be out on friday (we hope so)

regards werner
Find all posts by this user
08-20-2008, 03:22 PM
Post: #9
RE: NZBget on the PCH/NMT Howto and FAQ
Yes sorry I was a little toooooo Enthusiastic.

I will have to wait....Sad

C-200 + A-410 + Samsung 46F8500 +SONY STR-DB 870 QS

C-200 Dutch manual: download it here.
Find all posts by this user
08-20-2008, 03:28 PM
Post: #10
RE: NZBget on the PCH/NMT Howto and FAQ
no problem hehehe Smile i know it is bad that it isnt already avaible but we wanna make it as stable as we can make it in that time Smile the eta was planed that this frirmware should bee out already 3 weeks now hehe but everytime there was something which was important to fix.

regards werner
Find all posts by this user
08-20-2008, 06:40 PM
Post: #11
RE: NZBget on the PCH/NMT Howto and FAQ
(08-20-2008 02:16 PM)daniel_owen_uk Wrote:  It's in latest beta, if RC5 passes testing it might be out this weekend Big Grin

That is so great! I'll be eagerly pressing my "Check for updated firmware" button between now and then. I've got to say, when I purchased my PCH, I most definitely wasn't thinking "I need this to download from usenet" but now I just can't wait to upload my first NZB to my Popcorn Hour!
Find all posts by this user
08-20-2008, 06:46 PM
Post: #12
RE: NZBget on the PCH/NMT Howto and FAQ
hahaha for me it was my first wish i add as i get in contact with syabas that was last year june or july hehehe now i have it and my pc stays off i love it Smile
Find all posts by this user
08-20-2008, 06:46 PM
Post: #13
RE: NZBget on the PCH/NMT Howto and FAQ
Indeed me too. I don't use torrents much. I am so happy with my PCH. I almost installed a Windows Media Center. Altough I have a good PC (Asus Pundit) for it. Of course both have pro and cons, but in the end it's just 90% movie watching. Browsing and reading email is something for normal PC and I have my laptop running almost 24hr aday on the counch.

Sorry for going a little off topic, just wanna share my feelings.

C-200 + A-410 + Samsung 46F8500 +SONY STR-DB 870 QS

C-200 Dutch manual: download it here.
Find all posts by this user
08-22-2008, 05:52 PM
Post: #14
RE: NZBget on the PCH/NMT Howto and FAQ
This is awesome, awesome stuff. Will this be pre-loaded on the PCH going forward, so it'll already be active on my A-110 when it (eventually) ships?
Find all posts by this user
08-22-2008, 05:54 PM
Post: #15
RE: NZBget on the PCH/NMT Howto and FAQ
Nah because it installs on the HDD that it won't ship with.

When you put a HDD in and update the firmware via the menu it will be there.... eventually Wink
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  NZBGET v11.0 and AVIs scrowner 3 298 04-04-2014 12:21 AM
Last Post: jhmiller
Star NZBGet 9.0/10.0 discussion hugbug 496 98,044 03-16-2014 03:40 PM
Last Post: Mercury147
  NZBGET installation problem Popcorn Hour C-300 progier 0 734 12-20-2013 10:57 PM
Last Post: progier
  NZBget speeds? guerilla 1 850 11-12-2013 07:53 PM
Last Post: mmccking
Sad NZBget 11 is unable to unpack double Rarred files jeffery.leene 0 1,095 11-11-2013 11:59 PM
Last Post: jeffery.leene
  NZBGET postprocess to specified folder Goldrolly 10 2,562 10-20-2013 07:45 PM
Last Post: xxquatroxx
  NZBGet 11 Dest & Temp dir problem xxquatroxx 6 1,146 10-20-2013 07:42 PM
Last Post: xxquatroxx
  nzbget config giovan39 1 1,757 10-20-2013 11:39 AM
Last Post: xxquatroxx
  NZBGet 11.0 Stable just hanging in browser toastie 5 1,038 10-19-2013 07:44 PM
Last Post: jhmiller
Information NZBGET install to USB Stick with internal HD bblaze 1 1,813 10-18-2013 11:46 AM
Last Post: xxquatroxx

Forum Jump: