Autodownload script

Come up with a useful post-processing script? Share it here!
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: Autodownload script

Post by binhex »

rollingeyeball wrote: binhex, keen to try that, I'll experiment anyway but could you provide an example in the folder and file spots.

Thanks,
Rolling
sure!, an example of the files/folders i use is as follows:-

#put your own folder names below as specified in sabnzbd+
watch_dir="H:\\Downloads\\Usenet\\SABnzbd\\Watched"
nzb_dir="H:\\Downloads\\Usenet\\SABnzbd\\NZBs"
completed_dir="H:\\Downloads\\Usenet\\SABnzbd\\Completed"

#put your own folder names below to specify the location of your movie collection
movies_dir1="G:\\Videos\\H264 Format\\HD Rips\\Movies\\Scene"

#put your own folder and filenames below to specify location of log files
mainlog="F:\\Scripts\\Logs\\autodl_hd_main.log"
tracelog="F:\\Scripts\\Logs\\autodl_hd_traceback.log"

note the double slashes are for windows users, if your a linux user then obviously the format will be different, let me know how you get on.
Last edited by binhex on February 18th, 2009, 9:02 am, edited 1 time in total.
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: Autodownload script

Post by rollingeyeball »

[redacted by admin]
Last edited by inpheaux on February 20th, 2009, 12:56 pm, edited 1 time in total.
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: Autodownload script

Post by rollingeyeball »

Hmm..

It also seems to finish prematurely.

[redacted by admin]

And then it's done.. Thats definately not the end of the RSS

Sorry for the double, I thought it'd be easier to seperate the two issues.
Last edited by inpheaux on February 20th, 2009, 12:57 pm, edited 1 time in total.
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: Autodownload script

Post by binhex »

rollingeyeball wrote: Hmm..

It also seems to finish prematurely.

Last entry:

Code: Select all

Status: Skipping Movie.....
IMDB Movie Title: Love, Peace And Beatbox (http://www.imdb.com/title/tt1172187/)
Release Movie Title: Love.Peace.And.Beatbox.2008.LiMiTED.DVDRip.XviD-AEROHOLiCS
Debug: Rating < 6.5
Debug: Votes < 5,000
Debug: Genre Is Unsuitable
Debug: Language Of Movie Is NOT English
Debug: Language Of Country Is NOT English
Debug: Size Is Too Small/Large
Debug: Format is NOT BluRay or HDDVD
And then it's done.. Thats definately not the end of the RSS

Sorry for the double, I thought it'd be easier to seperate the two issues.
right i think i know what the issue is here, the script i put up was for hd movies i.e. bluray and hddvd material not xvid's thus its not downloading due to my filters saying the size is too small and the format isnt correct.

just changed my post, decided to make things easy and post a modified script for xvid's, hope this works for you, please let me know how you get on.

binhex.

link to modified script for xvid downloads:- http://pastebin.com/f7fd6c324
Last edited by binhex on February 18th, 2009, 10:54 am, edited 1 time in total.
djoeney
Newbie
Newbie
Posts: 1
Joined: February 18th, 2009, 4:23 am

Re: Autodownload script

Post by djoeney »

It look likes a good script to me but he doesn't let sabnzbd download the files  he says:

Status downloading movie
But when i look in sabnzbd there aint a movie in it to download
Do i need to configure something in RSS?
I really dont get it

Please let me know

Thanks
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: Autodownload script

Post by rollingeyeball »

@binhex

I kinda figured, but not everyone can afford to get HD :P
Thats heaps better now. I got it to add one to queue (2cd's 1.6gb~)
But It won't download yes man, nor anything else in the 800mb~ range

I'm guessing isgoodsize regex needs more tweaking? I don't understand it :(

Code: Select all

                #This is set to download movies with file sizes from 4GB to 19GB (x264 format)
                if re.compile("[8-9][0-9][0-9] MB|1.[0-9][0-9] GB", re.IGNORECASE).search(check_movie_size):
Do you think it would be possible to search the title for certain strings to exclude?
Like.. I might not want all dvdrips but I don't want cams. so search title for CAM or whatever if it returns true then move along? Just a suggestion, it's probably alot of work.

oh and @djoeney
Check the watched folder in the script

Code: Select all

#put your own folder names below as specified in sabnzbd+
watch_dir="H:\\Downloads\\Usenet\\SABnzbd\\Watched"
1. Looks like that (double slashes)
2. Is the same as the Watched folder in sabnzbd -> config -> Folders


Also, is there anyway to prevent the python window from either showing, or stealing focus?
There was a similar post elsewhere, but I don't think it would apply.
Last edited by rollingeyeball on February 20th, 2009, 1:20 pm, edited 1 time in total.
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: Autodownload script

Post by binhex »

rollingeyeball wrote: @binhex

I kinda figured, but not everyone can afford to get HD :P
Thats heaps better now. I got it to add download the truman show (2cd's 1.6gb~)
But It won't download yes man, nor anything else in the 800mb~ range

I'm guessing isgoodsize regex needs more tweaking? I don't understand it :(

Code: Select all

                #This is set to download movies with file sizes from 4GB to 19GB (x264 format)
                if re.compile("[8-9][0-9][0-9] MB|1.[0-9][0-9] GB", re.IGNORECASE).search(check_movie_size):
yep that regex is incorrect, my error, easiest solution is to download the new xvid friendly script ive just posted up, ive just tested it and it works fine with movies from sizes 700MB to 2.5 GB :-)

link to xvid format downloader:- http://pastebin.com/f7fd6c324
Also, is there anyway to prevent the python window from either showing, or stealing focus?
There was a similar post elsewhere, but I don't think it would apply.
personally i just schedule the task to run in windows (using task scheduler) that way its invisible and doesn't show, the nice output from the script is really only so i can debug issues if the script doesnt download a movie i think it should of downloaded :-)
Last edited by binhex on February 18th, 2009, 11:18 am, edited 1 time in total.
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: Autodownload script

Post by rollingeyeball »

Wow you reply fast. Jolly good!

I edited my last post, incase you didn't notice here:

Do you think it would be possible to search the title for certain strings to exclude?
Like.. I might not want all dvdrips but I don't want cams. so search title for CAM or whatever if it returns true then move along? Just a suggestion, it's probably alot of work.

That xvid friendly one you posted produced an error, so heres my (working) one.
Your original + edits + working regex from xvid friendly
http://pastebin.com/f1d22d8c1
personally i just schedule the task to run in windows (using task scheduler) that way its invisible and doesn't show, the nice output from the script is really only so i can debug issues if the script doesnt download a movie i think it should of downloaded :-)
See, I schedule the tv autodownload script that way.. and it shows..
I'll schedule this one too and see if it's invisible but i doubt it?
Your task scheduler is magic :P
Last edited by rollingeyeball on February 18th, 2009, 11:24 am, edited 1 time in total.
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: Autodownload script

Post by binhex »

rollingeyeball wrote: Wow you reply fast. Jolly good!

I edited my last post, incase you didn't notice here:

Do you think it would be possible to search the title for certain strings to exclude?
Like.. I might not want all dvdrips but I don't want cams. so search title for CAM or whatever if it returns true then move along? Just a suggestion, it's probably alot of work.

That xvid friendly one you posted produced an error, so heres my (working) one.
Your original + edits + working regex from xvid friendly
http://pastebin.com/f1d22d8c1
personally i just schedule the task to run in windows (using task scheduler) that way its invisible and doesn't show, the nice output from the script is really only so i can debug issues if the script doesnt download a movie i think it should of downloaded :-)
See, I schedule the tv autodownload script that way.. and it shows..
I'll schedule this one too and see if it's invisible but i doubt it?
Your task scheduler is magic :P
ok bug fixed, i had left in an additional downloaded dir check (my collection spans multiple drives) and thus it was erroring on this, i have also just coded in your request, check out the section called isGoodFormat in the script below, i have set it to download all formats excluding "cam", you can easily tweak this by removing/adding format types.

http://pastebin.com/f5f530116

enjoy!.

binhex.

p.s the script doesn't show when running as a scheduled task, at least in vista it doesnt, would actually be surprised if it did show, hmm wierd!.
Last edited by binhex on February 18th, 2009, 2:11 pm, edited 1 time in total.
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: Autodownload script

Post by rollingeyeball »

You left in your userid. might want to remedy that :P

Thanks though, testing now. I'll edit this
;D Works 100%
Thats really great.

BTW about the scheduler I'm using XP so that -could- be it.
I'll look into it.


EDIT:
I've found a solution.
rename the python script into .pyw
Also, make sure you  callit directly -not through python.exe
ie. 'RUN: E:\Python26\rss_tv.py'
NOT
'RUN E:\Python26\python.exe E:\Python26\rss_tv.py'

Doing it the other way just doesn't work. Tested.

EDIT2:
Solution 2:
Use 'pythonw' instead of Python to launch the script.
so.
'RUN E:\Python26\pythonw.exe E:\Python26\rss_tv.py'

You probably all knew that  :-\

Nice ninja edit, but no-one fools the f5master.   ;)
Last edited by rollingeyeball on February 18th, 2009, 2:01 pm, edited 1 time in total.
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: Autodownload script

Post by binhex »

rollingeyeball wrote: You left in your userid. might want to remedy that :P

Thanks though, testing now. I'll edit this
;D Works 100%
Thats really great.

BTW about the scheduler I'm using XP so that -could- be it.
I'll look into it.


EDIT:
I've found a solution.
rename the python script into .pyw
Also, make sure you  callit directly -not through python.exe
ie. 'RUN: E:\Python26\rss_tv.py'
NOT
'RUN E:\Python26\python.exe E:\Python26\rss_tv.py'

Doing it the other way just doesn't work. Tested.

EDIT2:
Solution 2:
Use 'pythonw' instead of Python to launch the script.
so.
'RUN E:\Python26\pythonw.exe E:\Python26\rss_tv.py'

You probably all knew that  :-\

Nice ninja edit, but no-one fools the f5master.   ;)
damn, forgot to remove the user id, thanks for the heads up on that, its now removed :-).

yep that would explain why you were seeing a windows and i wasn't , as i was calling the script directly and not the python.exe. glad its all now working well, let me know if you have any further feature requests and also if you get any error messages i would also be interested to see what they are.

one thing i thought i would point out is that now your downloading pre dvd material you may come across the problem that imdb doesnt have either any or enough votes and thus the movie will get skipped so you might need the minimum number of votes reducing to say 1,000, as its currently set at 5,000.
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: Autodownload script

Post by rollingeyeball »

Code: Select all

one thing i thought i would point out is that now your downloading pre dvd material you may come across the problem that imdb doesnt have either any or enough votes and thus the movie will get skipped so you might need the minimum number of votes reducing to say 1,000, as its currently set at 5,000.
Valid point, thanks. I'll see how it goes, and may even go back to dvdrips only.

As far as bugs - any reason why it doesn't read through to the end of the rss?
It that a feature?

It always stops at the same movie, and that movie seems to trigger every halt there is, whether thats a bug or not, not sure. But yeah.. new movies have arrived in the feed, but it still stops at that same movie.
binhex
Sr. Member
Sr. Member
Posts: 470
Joined: December 5th, 2008, 11:54 am

Re: Autodownload script

Post by binhex »

rollingeyeball wrote:

Code: Select all

one thing i thought i would point out is that now your downloading pre dvd material you may come across the problem that imdb doesnt have either any or enough votes and thus the movie will get skipped so you might need the minimum number of votes reducing to say 1,000, as its currently set at 5,000.
Valid point, thanks. I'll see how it goes, and may even go back to dvdrips only.

As far as bugs - any reason why it doesn't read through to the end of the rss?
It that a feature?

It always stops at the same movie, and that movie seems to trigger every halt there is, whether thats a bug or not, not sure. But yeah.. new movies have arrived in the feed, but it still stops at that same movie.
strange, hmm it should read the entire rss feed, can you check your tracelog (location defined in script) and see what it says in there, it should be logging any errors, also what does the script say if you run it from a command line are there any error messages displayed?.
bnevets27
Release Testers
Release Testers
Posts: 57
Joined: February 17th, 2009, 5:03 pm

Re: Autodownload script

Post by bnevets27 »

I've been trying to get this script to run for a little while now. I've tried pretty much everyone on here. The movie script from Binhex works for me. But I haven't got the TV script to run. Using the latest as of writing, revision 12.  From : http://my-svn.assembla.com/svn/SABnzbd_ ... ownloader/ It runs and searches but keeps returning "FAILED PROCESSING" I'm on win xp
rollingeyeball
Release Testers
Release Testers
Posts: 181
Joined: January 30th, 2009, 12:26 pm

Re: Autodownload script

Post by rollingeyeball »

TV Script thread is here now
http://forums.sabnzbd.org/index.php?topic=1786.0

And for the record, I couldn't get that one to work either. I'm using 0.88 though.
Post Reply