count missing blocks before downloading rars?

Feel free to talk about anything and everything in this board.
Post Reply
billschu
Newbie
Newbie
Posts: 1
Joined: September 7th, 2010, 1:03 pm

count missing blocks before downloading rars?

Post by billschu »

Apologies if I missed it somewhere but I don't see anyplace we can tell sabnzbd to scan an nzb and total missing blocks to determine whether or not there are enough pars to repair BEFORE downloading all the rars.  (something like http://www.jongma.org/nzbscan/ only for linux)

(whether or not the feature exists, the FAQ on par post-proceesing would be a great place to include this info)

TIA
User avatar
john3voltas
Release Testers
Release Testers
Posts: 115
Joined: January 17th, 2008, 5:35 pm
Location: Lisbon/Portugal

Re: count missing blocks before downloading rars?

Post by john3voltas »

Sorry but I'm reviving an old thread but a most interesting one.
Who hasn't already bumped into fake usenet posts/nzb's?
Checking for password protection AND for enough repairing blocks BEFORE the download actually starts would be a killer!
billschu wrote: (something like http://www.jongma.org/nzbscan/ only for linux)
I'd say, nzbscan but not for Windows-only. We'd need it for Win32/64 and all *nix (linux/bsd/mac osx).
Does anyone know how nzbscan works?
How can it detect if articles are missing prior to downloading?
How can it detect if the content is password protected prior to downloading?
If we can understand how it works, maybe someone can make an addon for SAB+.
Cheers
SABnzbd 0.6.0Alpha11 on Fedora 14-64bit laptop.
Usenet-News, TeraNews, newszilla6.xs4all.nl and reader.ipv6.xsnews.nl.
IPv6 connections powered by Hurricane Electric.
Can pull 30Mbit nntp on a 30Mbit FTTH link.
User avatar
inpheaux
Administrator
Administrator
Posts: 562
Joined: January 16th, 2008, 9:14 pm

Re: count missing blocks before downloading rars?

Post by inpheaux »

This has actually already been done as a python script, and it was pretty damn fast too. Unfortunately, I can't seem to find the thread now.
User avatar
john3voltas
Release Testers
Release Testers
Posts: 115
Joined: January 17th, 2008, 5:35 pm
Location: Lisbon/Portugal

Re: count missing blocks before downloading rars?

Post by john3voltas »

inpheaux wrote: This has actually already been done as a python script, and it was pretty damn fast too. Unfortunately, I can't seem to find the thread now.
Really??
That'd be a cool thing to have running on my box.
Can you remember who coded the Py script?
Thanks Inpheaux.
Cheers
SABnzbd 0.6.0Alpha11 on Fedora 14-64bit laptop.
Usenet-News, TeraNews, newszilla6.xs4all.nl and reader.ipv6.xsnews.nl.
IPv6 connections powered by Hurricane Electric.
Can pull 30Mbit nntp on a 30Mbit FTTH link.
User avatar
john3voltas
Release Testers
Release Testers
Posts: 115
Joined: January 17th, 2008, 5:35 pm
Location: Lisbon/Portugal

Re: count missing blocks before downloading rars?

Post by john3voltas »

Could by any chance, this be it?
SABnzbd 0.6.0Alpha11 on Fedora 14-64bit laptop.
Usenet-News, TeraNews, newszilla6.xs4all.nl and reader.ipv6.xsnews.nl.
IPv6 connections powered by Hurricane Electric.
Can pull 30Mbit nntp on a 30Mbit FTTH link.
User avatar
inpheaux
Administrator
Administrator
Posts: 562
Joined: January 16th, 2008, 9:14 pm

Re: count missing blocks before downloading rars?

Post by inpheaux »

Yep, that's it. Now that we've got pre-processing scripts in 0.6 this would be pretty easy to implement.
User avatar
john3voltas
Release Testers
Release Testers
Posts: 115
Joined: January 17th, 2008, 5:35 pm
Location: Lisbon/Portugal

Re: count missing blocks before downloading rars?

Post by john3voltas »

Thanks Inpheaux.
Your tips were valuable in this search.
I'll, hpefully, take a look at this over the weekend.
Cheers
SABnzbd 0.6.0Alpha11 on Fedora 14-64bit laptop.
Usenet-News, TeraNews, newszilla6.xs4all.nl and reader.ipv6.xsnews.nl.
IPv6 connections powered by Hurricane Electric.
Can pull 30Mbit nntp on a 30Mbit FTTH link.
RXP
Jr. Member
Jr. Member
Posts: 53
Joined: January 22nd, 2008, 8:57 am

Re: count missing blocks before downloading rars?

Post by RXP »

Would be really great to see this implemented in the actual program rather than a script in a new version. Would save a ton of collective bandwidth!
User avatar
john3voltas
Release Testers
Release Testers
Posts: 115
Joined: January 17th, 2008, 5:35 pm
Location: Lisbon/Portugal

Re: count missing blocks before downloading rars?

Post by john3voltas »

RXP wrote: Would be really great to see this implemented in the actual program rather than a script in a new version. Would save a ton of collective bandwidth!
I second that :)
And also check for passworded articles too ;)
Cheers
SABnzbd 0.6.0Alpha11 on Fedora 14-64bit laptop.
Usenet-News, TeraNews, newszilla6.xs4all.nl and reader.ipv6.xsnews.nl.
IPv6 connections powered by Hurricane Electric.
Can pull 30Mbit nntp on a 30Mbit FTTH link.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: count missing blocks before downloading rars?

Post by shypike »

john3voltas wrote: And also check for passworded articles too ;)
Already in the code for 0.6.0

As for the pre-download check:
It's a massive amount of work, because it doesn't fit very well in the current design.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: count missing blocks before downloading rars?

Post by sander »

@shypike:

has a pre-queue script access to the sabnzbd-settings/parameters/functions like newsserver(s) and accounts? Or is it a completely separate scope?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: count missing blocks before downloading rars?

Post by shypike »

Separate scope.
You'd need to find and parse the INI file.
The API is not usable, because it won't give you the actual server passwords (security!).
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: count missing blocks before downloading rars?

Post by sander »

shypike wrote: Separate scope.
You'd need to find and parse the INI file.
The API is not usable, because it won't give you the actual server passwords (security!).

To parse the INI: I tried Python's ConfigParser, but it doesn't like the first line "__version__ = 19". When I remove that line, it's OK.

So: ConfigParser (if so: how to handle the first line), or a hand made parser (like http://www.decalage.info/en/python/configparser)?



EDIT:

This is what ConfigParser sees (after removing the first line from the ini):

Code: Select all

sander@lifebook:~/config-parser$ python lezen.py 
['[apps', '[misc', '[consoles', '[music', 'servers', '[books', 'newzbin', '[emulation', '[unknown', 'nzbmatrix', 'misc', '[reader.ipv6.xsnews.nl', '[tv', '[news.lightningusenet.com', 'categories', '[anime', 'logging', '[movies', '[games', '[pda', '[newsreader3.eweka.nl', '[newszilla6.xs4all.nl:119', '[resources', '[*']

... which is quite a different order than what's in the sabnzbd.ini file :-(

Code: Select all

sander@lifebook:~/config-parser$ grep "\[" sabbie.ini 
[misc]
[logging]
[newzbin]
[nzbmatrix]
[categories]
[[misc]]
[[tv]]
[[unknown]]
[[resources]]
[[apps]]
[[movies]]
[[consoles]]
[[books]]
[[games]]
[[anime]]
[[music]]
[[pda]]
[[emulation]]
[[*]]
[servers]
[[newszilla6.xs4all.nl:119]]
[[reader.ipv6.xsnews.nl]]
[[news.lightningusenet.com]]
[[newsreader3.eweka.nl]]
sander@lifebook:~/config-parser$
Last edited by sander on February 10th, 2011, 12:41 pm, edited 1 time in total.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
jcfp
Release Testers
Release Testers
Posts: 1032
Joined: February 7th, 2008, 12:45 pm

Re: count missing blocks before downloading rars?

Post by jcfp »

sander wrote:So: ConfigParser (if so: how to handle the first line), or a hand made parser (like http://www.decalage.info/en/python/configparser)?
Sab itself uses configobj.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: count missing blocks before downloading rars?

Post by sander »

jcfp wrote:
sander wrote:So: ConfigParser (if so: how to handle the first line), or a hand made parser (like http://www.decalage.info/en/python/configparser)?
Sab itself uses configobj.
Cool. That works. See code snippet.

Thank you.

Code: Select all

from sabnzbd.utils import configobj

# config = ConfigObj('/home/sander/.sabnzbd/sabnzbd.ini')


CFG = configobj.ConfigObj('/home/sander/.sabnzbd/sabnzbd.ini')


section1 = CFG['misc']
#print section1

serversection = CFG['servers']
# print serversection

print "servers defined:"
for server in CFG['servers']:
	print server
	print CFG['servers'][server]
	print "... with host name:"
	print CFG['servers'][server]['host']
	print "... with username:"
	print CFG['servers'][server]['username']


print "subsection:"
print CFG['servers']['newszilla6.xs4all.nl:119']

print "... with host name:"
print CFG['servers']['newszilla6.xs4all.nl:119']['host']
Last edited by sander on February 10th, 2011, 1:40 pm, edited 1 time in total.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply