Autodownload script

Come up with a useful post-processing script? Share it here!
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Autodownload script

Post by doubledrat »

deleted dopey question!
Last edited by doubledrat on December 29th, 2008, 1:11 pm, edited 1 time in total.
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Autodownload script

Post by doubledrat »

I've modified both of these scripts to work slightly differently -

They now support
  • windows (\) or unix (/) style directory separators [TV]
  • multiple directories holding existing content
  • a watch list to downoad movies based on a string match, no matter what score they get - just create a (blank) file in the nominated directory with the name corresponding to what you want e.g. trek, solace, max payne  etc.
  • for me, if something new appeared twice, it was downloaded twice.  the scripts now create the destination directory to prevent that [TV] (I changed the movie code to prevent duplicate downloads without directory creation due to the way the code works)
  • all configuration at top of code, so easier to change for your setup

    [li]supports my tv layout of

Code: Select all

%sn\Season %s\%0e\%sn - S%0sE%0e - %en.%ext
  • ex: c:\EXTERNAL\UnpackDrive\unpack\Show Name\Season 1\05\Show Name - S01E05 - Episode Name.avi
    (you can revert to previous way by changing the "regex_episode" line)
if you're interested, I've posted them here
(even if you're not I've still posted them ;))

tv: http://pastebin.com/f730eb923
movies: http://pastebin.com/f61e1a8eb
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Autodownload script

Post by doubledrat »

ok, so I like fiddling :)

I've modified them so they should auto-detect windows or linux and behave accordingly

tv: http://pastebin.com/f32d3e9bb
movies: http://pastebin.com/f52a9a492
popcornarsonist
Newbie
Newbie
Posts: 13
Joined: January 28th, 2008, 6:53 pm

Re: Autodownload script

Post by popcornarsonist »

JohnnyV wrote: How can I add the ability to check if an .MKV or .AVI has allready been downloaded, then have the script get both (newzbin).
for example, if I have "MY_SHOW_S03E04_BLAHBLAH.avi" all ready, but now there is a MKV or true high def version, add the MKV version to the pool. And also, if there is an MKV or True High def version allready, just skip the AVI file.
This would be a bit tricky, but still manageable. It would require some updates to the isMissing() function. So it would basically cover a couple of different possibilities:

-No file already exists: return 1
-The file to be downloaded is an avi, and an avi already exists: return 0
-The file to be downloaded is a mkv, and an avi already exists: return 1
-The file to be downloaded is a mkv, and a mkv already exists: return 0

This would be done with regex, most likely. Is this along the lines of what you were thinking?
doubledrat wrote:


"8\.[0-9]/10" will look for a string that has "" followed by an 8, followed by a period, followed by a digit, followed by the string "/10".

So, if you want, say 7 and up, you'd need: "[7-9]\.[0-9]/10"
hi.  just downloaded your script and see that you hace the above regex in it.  that wouldn't include anything over 9.0 would it?  wouldn't you need =

"[8-9]\.[0-9]/10"

which wouldn't catch 10/10, but how likely is that?!
No, that regex will match anything from 7.0 to 9.9--I'm not worried about 10/10 movies, with at least 1000 votes, that's never going to happen.
doubledrat wrote: ok, so I like fiddling :)

I've modified them so they should auto-detect windows or linux and behave accordingly

tv: http://pastebin.com/f32d3e9bb
movies: http://pastebin.com/f52a9a492
Great work! I'm glad people are working with these--lets me feel less responsible for them!
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Autodownload script

Post by doubledrat »


No, that regex will match anything from 7.0 to 9.9--I'm not worried about 10/10 movies, with at least 1000 votes, that's never going to happen.
sorry, ambiguous of me.  the pastebin code had -

Code: Select all

"<b>8\.[0-9]/10</b>"
that's just 8.0-8.9/10 isn't it?
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Autodownload script

Post by doubledrat »

just modified TV so it can ignore whole seasons if you want it to.  will post later rather than post  a new version every 5 mins!
User avatar
JohnnyV
Newbie
Newbie
Posts: 22
Joined: December 28th, 2008, 1:04 am
Location: Chicago
Contact:

Re: Autodownload script

Post by JohnnyV »

This would be a bit tricky, but still manageable. It would require some updates to the isMissing() function. So it would basically cover a couple of different possibilities:

-No file already exists: return 1
-The file to be downloaded is an avi, and an avi already exists: return 0
-The file to be downloaded is a mkv, and an avi already exists: return 1
-The file to be downloaded is a mkv, and a mkv already exists: return 0

This would be done with regex, most likely. Is this along the lines of what you were thinking?


Yes.. Bare with me please, Im just learning Python.. this addition would be great. As 720p's (mkvs) come in later they will update the collection. Maybe and option to turn off MKV (HD) files for those that don't what them my be useful for others.
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Autodownload script

Post by doubledrat »

perhaps a more reliable way would be to work on the size of the existing file/directory?  things aren't always as clear cut as avi or mkv - you can have .ts (with multipart) for HD, you can have .mov .mp4 etc for low res...

there is a report:size element to the newzbin xml -

177900075

so perhaps something >=15% bigger than what you have already could be added to the queue?

so if you have nothing, a low res avi would be downloaded
a decent quality mov would follow
a hi-res mkv would be added after that

not sure if you can get the size of what's in the queue though?  maybe this would have to only work on already downloaded content?
funtek
Newbie
Newbie
Posts: 8
Joined: December 31st, 2008, 2:55 am

Re: Autodownload script

Post by funtek »

doubledrat wrote: perhaps a more reliable way would be to work on the size of the existing file/directory?  things aren't always as clear cut as avi or mkv - you can have .ts (with multipart) for HD, you can have .mov .mp4 etc for low res...

there is a report:size element to the newzbin xml -

177900075

so perhaps something >=15% bigger than what you have already could be added to the queue?

so if you have nothing, a low res avi would be downloaded
a decent quality mov would follow
a hi-res mkv would be added after that

not sure if you can get the size of what's in the queue though?  maybe this would have to only work on already downloaded content?
The problem with that is that certain rips are SVCD, which will almost always be bigger in MB than the 480p avi's, but lower in quality. So maybe if the mkv is available *and bigger* than the avi, it should add it so you don't have to blindly assume bigger==better.

EDIT: Or I guess you could just take VCD/SVCD out of your Newzbin search...
Last edited by funtek on January 2nd, 2009, 7:44 pm, edited 1 time in total.
jl0810
Newbie
Newbie
Posts: 18
Joined: December 27th, 2008, 8:01 am

Re: Autodownload script

Post by jl0810 »

doubledrat wrote: ok, so I like fiddling :)

I've modified them so they should auto-detect windows or linux and behave accordingly

tv: http://pastebin.com/f32d3e9bb
movies: http://pastebin.com/f52a9a492
this is another great script.  Anyone have doublerat's version working with www.nzbs.org?&nbsp; (for those of us who don't have newsbin logins)?  I saw in Nov this was attempted but now the script has developed much more and having a nzbs version of the "latest and greatest"  would be pretty cool  8)
thanks
Cuchulainn
Release Testers
Release Testers
Posts: 7
Joined: December 1st, 2008, 9:11 am

Re: Autodownload script

Post by Cuchulainn »

jl0810 wrote:
doubledrat wrote: ok, so I like fiddling :)

I've modified them so they should auto-detect windows or linux and behave accordingly

tv: http://pastebin.com/f32d3e9bb
movies: http://pastebin.com/f52a9a492
this is another great script.  Anyone have doublerat's version working with www.nzbs.org?&nbsp; (for those of us who don't have newsbin logins)?  I saw in Nov this was attempted but now the script has developed much more and having a nzbs version of the "latest and greatest"  would be pretty cool  8)
thanks

Chech the posts of xxhds in this thread (page 2). Works brilliantly with nzbs! To prevent double downloading you can specify a backup folder for the nzb-files.
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Autodownload script

Post by doubledrat »

funtek wrote: The problem with that is that certain rips are SVCD, which will almost always be bigger in MB than the 480p avi's, but lower in quality. So maybe if the mkv is available *and bigger* than the avi, it should add it so you don't have to blindly assume bigger==better.

EDIT: Or I guess you could just take VCD/SVCD out of your Newzbin search...
Having thought about this, I reckon you can do this with the existing script by having 2 versions of it, becuase it will support multiple locations -

have newzbin search 1 that gets your low-def content
search 2 for hi-def content

version 1 of the script will place you low-def content in e.g. c:\tv
version 2 will place hi-def content in e.g. c:\hdtv

now here's the funky bit.
tell version 1 to check for existence of content in c:\tv AND c:\hdtv
tell version 2 to only check the existence of content in c:\hdtv

which should mean that you will always get the hd version, but you will only get the low def version if you don't already have the hi-def version.

should work

so

v1

Code: Select all

#
# set this to the location of your downloads.  the first entry must be your live download area
#
tv_dirs=[ "c:\\tv", "c:\\hdtv" ]
#
 
#
# the RSS link to your search
#
tvurl="your low definition search"
v2

Code: Select all

#
# set this to the location of your downloads.  the first entry must be your live download area
#
tv_dirs=[ "c:\\hdtv ]
#
 
#
# the RSS link to your search
#
tvurl="your high definition search"
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Autodownload script

Post by doubledrat »

here is the latest TV script

http://pastebin.com/f4fda2abb

it is my HD version of the script.  the difference between the hd and other version is simply the user modifyable parameters at the top, the code is the same

changes to previous pastebinned code  -

ability to ignore whole seasons (maybe they're old ones you don't care about?  perhaps you have them on DVD so don't want to download them?)
ability to specify additional parameters to sab, this will allow you to force a specific category or post processing script etc.
User avatar
JohnnyV
Newbie
Newbie
Posts: 22
Joined: December 28th, 2008, 1:04 am
Location: Chicago
Contact:

Re: Autodownload script

Post by JohnnyV »

Thanks. Will give this a try in a few days. Re-wiring my entire setup this week. :P
pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Autodownload script

Post by pilGrim »

Hi All,

I have been a usnet user for almost 8 years now (giganews and newsbin) and just discovered Sabnzbd and the ease of nzb files.  I just love all this post download management as it saves a TON of time. 

I am not a newzbin.com user as I just discovered the service (would greatly appreciate a sponsor to join) and my question is from an RSS standpoint how does this python script compare to using NZB-TV1.20?  http://two-sided.com/cs/&nbsp; That program looks very slick from a standpoint of finding exactly what you are looking for and auto downloading the nzb files.

I am very eager to get more of my work flow automated.

Many thanks for the feedback.

Greg
Post Reply