SABnzbd Smart Downloader

Come up with a useful post-processing script? Share it here!
minimad
Release Testers
Release Testers
Posts: 62
Joined: January 11th, 2009, 5:45 pm

Re: SABnzbd Smart Downloader

Post by minimad »

Hi Guys,

Just realised that revision 12 might only work with NON newzbin feeds in its current state.

Teating nzbs.org feed right now.
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: SABnzbd Smart Downloader

Post by markus101 »

minimad wrote: @markus101
Lucky you, your () and ' are the first ticket in 'Trac'

Awesome, looking forward to that, unless it gets superseded by another fix, caching looks good too, that makes it 100x faster from the tests I did on SVN feeds.
minimad wrote: Just realised that revision 12 might only work with NON newzbin feeds in its current state.
Noooooo! haha, might explain the issues I was having along with rollingeyeball.

-Markus
Last edited by markus101 on February 20th, 2009, 6:37 pm, edited 1 time in total.
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
minimad
Release Testers
Release Testers
Posts: 62
Joined: January 11th, 2009, 5:45 pm

Re: SABnzbd Smart Downloader

Post by minimad »

@All

I present Revision 15 as a SEMI-Working version.

It should recognise NewzBin feeds, NZBs.org feeds & TVBinz.net feeds AND add into the queue.

I've run out of credit for NewzBin so haven't tested actual download, but SABnzbd does try to get the nzb, same with nzbs.org but I get failed archive???

Any bugets, please let me know
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: SABnzbd Smart Downloader

Post by rollingeyeball »

Code: Select all

IDLE 2.6.1      ==== No Subprocess ====
>>> 
loading E:\Python26\TVDBNames.cache .. 
.. done.
{'evalcacheversion_creation': '20090212a-jmf'}
Traceback (most recent call last):
  File "E:\Python26\tv_rss.py", line 872, in <module>
    Main()
  File "E:\Python26\tv_rss.py", line 769, in Main
    logger.info("PROCESS NZB FEED: " + feed)
  File "E:\Python26\lib\logging\__init__.py", line 1021, in info
    self._log(INFO, msg, args, **kwargs)
  File "E:\Python26\lib\logging\__init__.py", line 1129, in _log
    self.handle(record)
  File "E:\Python26\lib\logging\__init__.py", line 1139, in handle
    self.callHandlers(record)
  File "E:\Python26\lib\logging\__init__.py", line 1176, in callHandlers
    hdlr.handle(record)
  File "E:\Python26\lib\logging\__init__.py", line 662, in handle
    self.emit(record)
  File "E:\Python26\lib\logging\__init__.py", line 761, in emit
    self.stream.write(fs % msg.encode(self.stream.encoding))
  File "E:\Python26\lib\idlelib\PyShell.py", line 1244, in write
    self.shell.write(s, self.tags)
  File "E:\Python26\lib\idlelib\PyShell.py", line 1233, in write
    raise KeyboardInterrupt
KeyboardInterrupt
>>> 
Thats running __version__ = "0.91"
Revision 15 I guess.
Do i need a different pythnon version perhaps?

EDIT:
MY BAD
PC died earlier and I've since reinstalled windows and my  tv_dirs changed, but i forgot to tell the script.
This new one is like lightning!
Works well so far. (1 show)
Last edited by rollingeyeball on February 20th, 2009, 10:36 pm, edited 1 time in total.
minimad
Release Testers
Release Testers
Posts: 62
Joined: January 11th, 2009, 5:45 pm

Re: SABnzbd Smart Downloader

Post by minimad »

@rollingeyeball,

:-) glad I'm not the only one making mistakes.

How do you like the new logging function?  I thought it would help everyone with error reports and just generally having a log of what was going on.  Pretty much everything is logged out but I want to cut back of how much and what level, but that will be after I fix the () & ' issue.

Once I work out this SVN stuff (branches, revisions, HEAD etc) I'll try to make proper working releases.

just nzbs.org that's giving me a headache or is it feedparser, anyway one of the two makes the url have %3F etc whichs really messes upthe nzb downloading.
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: SABnzbd Smart Downloader

Post by rollingeyeball »

What just making feedburner mandatory?
Or somehow implementing feedburner intor the script? auto publishing or something.

Log is good :P
I can see it getting very big very fast, seeing as it shows the tv_dir folders every time, and with a large collection (like some) that could get bad.
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: SABnzbd Smart Downloader

Post by markus101 »

Yes, running the script every 15 minutes and having it log all output makes huge log files, previously to the lower-case compare I was at about 25MB over the course of a week or more, now the log files are 25MB a day. I alos ended up making my Shell script that runs the python code redirect the log file to a dated file (to cut down on overall log size), haven't built in a way to delete log files older than X days, but it might be worthwhile, but not sure how much logging I'll be doing after this is concrete.

I like the idea of it logging errors without using redirect, now I'll just have to get the latest version going.

-Markus
Last edited by markus101 on February 21st, 2009, 3:22 pm, edited 1 time in total.
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
minimad
Release Testers
Release Testers
Posts: 62
Joined: January 11th, 2009, 5:45 pm

Re: SABnzbd Smart Downloader

Post by minimad »

Oh Yeah,

Il'd better stop it logging each directory.

Revision 17 doesn't output to log, directories now.  simple two line change.  lines 407 & 408

Log rotation : hmm, I feel another ticket coming on.

the url issue: is it only affecting nzbs.org or does it also affect tvbinz.net (still can't test) and newzbin (haven't had chance to test).

I'm not using feedburner but feedparser, SABnzbd uses it and handles nzbs.org ok so i must be missing something.  Get the idea for feedparser from the SABnzbd code in the first place, those guys really know their stuff.
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: SABnzbd Smart Downloader

Post by markus101 »

How do I add items to trac? Not sure the URL to follow, just have the SVN link, let me know and I'll add the Log rotation stuff.

Thanks,

Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
minimad
Release Testers
Release Testers
Posts: 62
Joined: January 11th, 2009, 5:45 pm

Re: SABnzbd Smart Downloader

Post by minimad »

First post edited for 'Trac' link

Saying here as well (just in case you don't want to go to the first post)
http://my-trac.assembla.com/SABnzbd_Smart_Downloader
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: SABnzbd Smart Downloader

Post by rollingeyeball »

I'm already confused.
Can you add the revision numbers in the script themselves next to ver.no?

I thought we were at 19.
minimad
Release Testers
Release Testers
Posts: 62
Joined: January 11th, 2009, 5:45 pm

Re: SABnzbd Smart Downloader

Post by minimad »

Ah,

Sorry about that,

Just reorganised the SVN so you might need to checkout from a slightly different path (append trunk or tag/0.9.2 to the original url)

There are now trunk, tag & branch directories.

trunk will always contain my most recent code, working or not

tag will contain specific releases, first is 0.9.2 (which is I've put into the script version).

branch will contain deviations to the trunk.

This *should* resolve the revision/version number confusion

I can now specify releases
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: SABnzbd Smart Downloader

Post by markus101 »

Cool, thanks Minimad, now how do I add a ticket? I can see the ticket(s) (just the one there), but can't seem to find an option to add one, do I have to be logged in? If so how do I create an account and login?

Good call on the changes to SVN, will made it much easier to download working copies and still allow uncompleted code to saved (as you said before darn Windows).

Created a user on Asembla and now I'm "watching" This project on Asembla...

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
minimad
Release Testers
Release Testers
Posts: 62
Joined: January 11th, 2009, 5:45 pm

Re: SABnzbd Smart Downloader

Post by minimad »

Hi markus,

Well, I can see that you logged into the trac about 21 mins ago so there should have been a 'New Ticket' button somewhere.

I think it didn't show up for me first time I went in so maybe try again.
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: SABnzbd Smart Downloader

Post by markus101 »

Low and behold, Forced Refreshed and it's there. Thanks for the suggestions Minimad.

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Post Reply