How-to
NzbGet Webui
Changing SVN Repository
NzbMatrix Login
Lighttpd Configuration
Perl Modules
Remote Post Processing
Basic Categories
Advanced Example
NZBGet Settings
Questions - for all PPWeb related questions or issues.
You're also welcome to post new new How-to topics.
NzbGet Webui
...PPWeb r154 is compatible with NZBGet >= r477 (until configuration options change) and should not require any manual effort on your part. The only caveat is that it will only work if there's no nzbget.conf file in webui/ (when you start the update, there will be when its done). The update script also needs to be able to determine the NZBGet revision being run. If that test fails, please let me know.
...Changed in r158. The default nzbget.cft is the same as nzbget_new.cft and works with any nzbet binary >= r477. The contents of nzbget.cft will automatically be replaced with nzbget_old.cft when PPWeb determines that you are running an nzbet binary < r477, or if it cannot determine the version being used.
Existing svn users will need to run (u)pdate at least twice, once to fetch the updated files and once to apply the changes. If the new Configure : CATEGORIES page is not populated, run update a third time.
[ comment | link | top ]
Changing SVN Repository
To change from davelers to googlecode (3 commands, 2nd includes 's/...g/')
cd /your/path/to/ppweb
find . -name entries | xargs perl -pi -e 's/52809d3e-9b55-42f7-bf3c-1b95a339b368/d406fa66-81d3-5def-5f9f-940a6c657d48/g'
svn switch --relocate http://davelers.com/svn/ppweb/trunk http://ppweb.googlecode.com/svn/trunk
[ comment | link | top ]
NzbMatrix Login
For Firefox go to Preferences : Privacy : remove individual cookies, search for nzbmatrix and copy/paste the Content values for "uid" (6 or so numbers) and "pass" (a string of letters and numbers).
Information on how to retrieve cookie values from other browsers would be appreciated.
...Apparently Internet Explorer allows you to save cookies to a Cookies.txt from File : Import and Export.
The method above will create a Nzbmatrix_cookies.lwp file in /ppweb/data. You can also create/edit the file manually. Nzbmatrix_cookies.lwp should contain the following three lines. Paste the Content values between the appropriate equal sign and semicolon.
#LWP-Cookies-1.0
Set-Cookie3: pass=; path="/"; domain=nzbmatrix.com; path_spec; discard; version=0
Set-Cookie3: uid=; path="/"; domain=nzbmatrix.com; path_spec; discard; version=0
[ comment | link | top ]
Perl Modules
# perl -MCPAN -e shell
cpan> install LWP::UserAgent
cpan> install CGI
(cpan> force install CGI)
cpan> install LWP::Protocol::https
(cpan> force install LWP::Protocol::https)
cpan> q
PPWeb's configure/update script will let you know if you don't have functioning CGI and LWP modules. The https module is only required for NzbsRus and any errors will be printed to the ppweb log.
[ comment | link | top ]
Lighttpd Configuration
The minimum required modules are mod_fastcgi and mod_cgi. Full functionality requires all the listed modules. If fastcgi.conf, cgi.conf, etc. files exist (typically in a subdirectory, e.g. /etc/lighttpd/conf.d), look for and uncomment the relevant include lines in modules.conf (or lighttpd.conf). Otherwise, uncomment or add the listed modules to the server.modules block, e.g.:
server.modules = (
"mod_fastcgi",
"mod_cgi",
"mod_setenv",
"mod_rewrite",
"mod_access",
)
see also: server.modules option
mod_fastcgi
The minimum mod_fastcgi configuration (in fastcgi.conf, if it exists) needs to include the path to the PHP executable and a socket (if its preconfigured and enabled, you shouldn't have to change it), e.g.:
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket",
)))
see also: mod_fastcgi - fastcgi
mod_cgi
The minimum mod_cgi configuration (in cgi.conf, if it exists) needs to include the perl path for .cgi scripts, e.g.:
cgi.assign = (
".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl",
)
mod_setenv
...The `which [exec]` calls I added in r143 (for nice, ionice, nzbget, etc. PATH lookups) were failing with lighttpd until I added mod_setenv (above) and
setenv.add-environment = ( "PATH" => env.PATH )
to my lighttpd.conf. The solution was found here. Note: this isn't required, you can find and set your own paths. I was hoping the which tests would simplify things, but no such luck.
...Note: I'm pretty sure not having mod_setenv enabled/setup is responsible for some of the other issues folks have had with PPWeb, i.e. enabling it is highly recommended.
mod_rewrite
...The Newznab sites direct download/queue option (added in r131) needs mod_rewrite (added above) and the following somewhere in your lighttpd.conf (adjust the relative path if needed):
url.rewrite-once = (
"^/api/?\?(.+)$" => "/ppweb/ppweb/cgi-bin/ppweb_sab.cgi?$1"
)
Newznab sites also need to reach your web sever - http://foo/, not your ppweb install. The only thing they send is a query string (http://foo/api/?mode=addurl&...) that provides PPWeb with the information it needs to fetch an nzb.
mod_access
...If you allow the public to access your server, folks who know what to look for can access PPWeb generated content. If you allow public access, restricting your ppweb directory to LAN computers/users is highly recommended. I currently don't have lighttpd setup and cannot test this (don't know if SAB redirect will work).
# deny access to users not in the LAN - 10.0.0.0/8, 192.168.0.0/16 or? - whichever is appropriate.
$HTTP["url"] =~ "^/ppweb/" {
$HTTP["remoteip"] != "192.168.0.0/16" {
url.access-deny = ( "" )
}
}
[ comment | link | top ]
Basic Categories
The nzb directory/category tree mirrors the download directory tree. When you place an nzb in a nzb sub-directory, the files will be downloaded to a nzb-name sub-directory in the matching download sub-directory. The nzbgetpp.pl script will extract any archives and delete any unwanted files... Because most folks want TV Show subcategories (with Season sub-directories), SaveDir is now enabled in default configuration. All SaveExt files are moved to SaveDir and the DestDir is deleted if empty.
The PPWeb default setup (parens) is configured with TV and Movie categories. TV watch list items and nzbs from nzb site TV categories are automatically queued to the TV category, video watch list items and nzb site movie categories to the Movies category.
NzbDir (nzb)
Category (TV, Movies)
nzb-name.nzb
DestDir (download)
Category (TV, Movies)
nzb-name directory
SaveDir (save) - optional
Category (TV, Movies)
Show (TvCats=all)
(Season - TvCatSeason=)
(Movie/nzb-name - NzbCats=)
[ comment | link | top ]
Advanced Example
My desire is too keep all NZBGet tasks separate from the files I want to keep (SaveExt). I also like to be able to put the extracted files in any directory that I own (SaveDir is my home dir). I only want nzb-name sub-directories (NzbDir) when the nzb will result in more than a few saved files. I want all my downloaded Video and TV files renamed (Rename).
NZBGet directory ($MAINDIR)
NzbDir
Category (Download, Music, TV, Video)
nzb-name.nzb
Category (foo/bar)
nzb-name.nzb
DestDir
Category (Download, Music, TV, Video)
nzb-name directory
downloaded files
SaveDir directory (only SaveExt files, e.g. extracted)
Download (Category)
files
Music (Category and NzbCats)
nzb-name directory
files
TV (Category and Rename)
Show nnn - title.ext (EpLabel and EpTitle - Show not listed in TvCats)
Show (TvCats)
Show nnn - title.ext (EpLabel - EpTitle)
Video (Category and Rename)
renamed files - typically nzb-name (a/b).ext
[ comment | link | top ]
Remote Post Processing
PPWeb can do all post processing on a remote *nix machine. This allows you to run NZBGet on a low powered 24/7 firewall/router/server and offload CPU intensive post processing to another machine. This is how I have been using ppweb for some years now.
Remote processing is automatic if the remote machine is up. If the remote machine was down when the downloads were completed, post processing can be triggered via links on the web interface Download page.
Both machines need to have ssh, rsync, scp and key-pairs. The remote also needs unrar and par2 (transcode for avimerge is optional).
For remote Processing set the variables in Configuration : PP Remote Processing.
Copy nzbgetpp.pl, ppweb.pm and ppweb.conf to RemoteDest.
Set the $Config and require paths to RemoteDest and $IsRemote to "1" in the remote copy of nzbgetpp.pl.
For remote par repair functions, enable General : PPWebPar (recommended).
For sample downloads set Paths : SampleDir to the full path on the remote.
For remote SaveDir/categories, set SaveDir to the full path on the remote.
Post processing happens in nzb-name sub directories of RemoteDest. Unlike DestDir, RemoteDest has no category sub directories. But, like local post processing, save file extensions can be moved to SaveDir and Category sub directories (recommended).
RemoteDest
nzb-name directories
nzbgetpp.pl
ppweb.conf
ppweb.pm
SaveDir (optional)
Categories
SaveExt files
[ comment | link | top ]
NZBGet Settings
For reference only, the following are all preconfigured by PPWeb
AppendCategoryDir
Yes for remote processing, otherwise your choice
AppendNzbDir
Always yes (PPWeb NzbDir is optional)
MergeNzb
Yes, allows concurrent sample and other queueing
DupeCheck
Yes allows sample downloads to be resumed
DeleteCleanupDisk
No, could interfere with sampling
RenameBroken
Always no
CreateBrokenLog
Yes may save a bit of time in some cases
LoadPars
Always "one"
ParCheck
No if remote processing, your choice otherwise (no will be faster if you seldom need par repair)
ParRepair
Yes, delayed when ParCheck=no (has no effect on remote processing)
AllowReProcess
Yes, needed for remote processing (currently has no effect on local processing)
[ comment | link | top ]
Questions
There's a lot about PPWeb that isn't documented. I'm happy to help with any PPWeb related questions or issues.
[ page | comments (34) - Tuesday, 23-Apr-2013 | top ]
