SABnzbd Smart Downloader
Re: SABnzbd Smart Downloader
hi guys i see my movie script for nzbs.org got incorporated so thought i would post my latest version, this version is created for use with newzbin.com and will download nzb files for 720p hd movies, please make sure you read the pre-requisites before attempting to run the script.
if there is enough demand i can tweak this for xvid/divx downloads too, also considering a xbox 360 version.
Pre-requisites
1. install latest version of python
2. login to newzbin and create a new custom search, example of a custom search for 720p HD material:-
"category" "movies"
"larger" than "4000MB"
"smaller" than "9000MB"
"video source" "HD-DVD/Blu-Ray"
"video format" "H.264/x264"
"language" "english"
3. click on new search and link to rss feed, copy and paste rss feed in section "newzbin_com_feed" (details encrypted, script uses ssl)
4. enter in your newzbin username and password in sections "newzbin_username"/"newzbin_password" (details encrypted, script uses ssl)
5. recommended setting - create "my exclusions"/"attribue exclusions" for unwanted video formats and languages
6. recommended setting - goto "my preferences"/"states" and set to "normal"
7. recommended setting - goto "my preferences"/"completion" and set to "completed"
8. schedule script to run using windows "task scheduler"
Features
movie title cache
the script will auto cache the checked movie titles, thus reducing the time taken to run and also prevents excessive hits on newzbin and imdb.
file checks
checks watched folder for existing nzb
checks nzb folder for existing nzb
checks completed downloads for existing movie
checks movie collection for existing movie
imdb checks
checks imdb rating value
checks imdb number of votes
checks imdb movie language
checks imdb movie country
checks imdb movie genre (bad and good)
checks imdb movie release date
checks imdb for good actor (will skip other imdb checks)
checks imdb for good character (will skip other imdb checks)
checks imdb for good movie title (will skip other imdb checks)
release checks
checks size of movie
checks source of movie
checks format of movie
checks resolution of movie
Download ver 1.0
http://pastebin.com/f72e7f221
new version uploaded, trimmed out page scrape of newzbin, using custom "my search" filters on newzbin website instead, this also means the script can now be used for ANY video format, not just hd content without alteration of the script, if any probs let me know.
Download ver 1.1
http://pastebin.com/f20f4fc43
if there is enough demand i can tweak this for xvid/divx downloads too, also considering a xbox 360 version.
Pre-requisites
1. install latest version of python
2. login to newzbin and create a new custom search, example of a custom search for 720p HD material:-
"category" "movies"
"larger" than "4000MB"
"smaller" than "9000MB"
"video source" "HD-DVD/Blu-Ray"
"video format" "H.264/x264"
"language" "english"
3. click on new search and link to rss feed, copy and paste rss feed in section "newzbin_com_feed" (details encrypted, script uses ssl)
4. enter in your newzbin username and password in sections "newzbin_username"/"newzbin_password" (details encrypted, script uses ssl)
5. recommended setting - create "my exclusions"/"attribue exclusions" for unwanted video formats and languages
6. recommended setting - goto "my preferences"/"states" and set to "normal"
7. recommended setting - goto "my preferences"/"completion" and set to "completed"
8. schedule script to run using windows "task scheduler"
Features
movie title cache
the script will auto cache the checked movie titles, thus reducing the time taken to run and also prevents excessive hits on newzbin and imdb.
file checks
checks watched folder for existing nzb
checks nzb folder for existing nzb
checks completed downloads for existing movie
checks movie collection for existing movie
imdb checks
checks imdb rating value
checks imdb number of votes
checks imdb movie language
checks imdb movie country
checks imdb movie genre (bad and good)
checks imdb movie release date
checks imdb for good actor (will skip other imdb checks)
checks imdb for good character (will skip other imdb checks)
checks imdb for good movie title (will skip other imdb checks)
release checks
checks size of movie
checks source of movie
checks format of movie
checks resolution of movie
Download ver 1.0
http://pastebin.com/f72e7f221
new version uploaded, trimmed out page scrape of newzbin, using custom "my search" filters on newzbin website instead, this also means the script can now be used for ANY video format, not just hd content without alteration of the script, if any probs let me know.
Download ver 1.1
http://pastebin.com/f20f4fc43
Last edited by binhex on April 17th, 2009, 4:12 am, edited 1 time in total.
Re: SABnzbd Smart Downloader
Hi all,
Just wondering if anyone else is still running the TV Show version of the script? I'm running the latest trunk version from Minimad, but having issues with duplicates (SAB catches most of them), but shows with () or ' cause it to attempt to re-download the show as it can't find it on disk. I have a rough idea on how it's processing and tried to play around with the missing check in the script, but I've been unable to solve it. Curious if anyone has figured out a way around it?
EDIT: A friend at work had a great suggestion, when matching episodes that are downloaded to ones on the RSS feed, why bother checking the Series name when seeing if the file was already downloaded?
ie. Series (2009) is stored like so:
The check to see if the show has the same series name as a folder it is residing in is redundant, unless you keep all shows in the same folder, without sub-folders (which wouldn't work with this script anyways).
If someone that knows a bit about Python and could do this, that would be awesome, i'm unsure as to what needs to change, but this makes the most sense and should be the easiest way to resolve. Let me know if you have any questions.
Thanks to those working on these auto-downloaders, it really makes life easier.
-Markus
Just wondering if anyone else is still running the TV Show version of the script? I'm running the latest trunk version from Minimad, but having issues with duplicates (SAB catches most of them), but shows with () or ' cause it to attempt to re-download the show as it can't find it on disk. I have a rough idea on how it's processing and tried to play around with the missing check in the script, but I've been unable to solve it. Curious if anyone has figured out a way around it?
EDIT: A friend at work had a great suggestion, when matching episodes that are downloaded to ones on the RSS feed, why bother checking the Series name when seeing if the file was already downloaded?
ie. Series (2009) is stored like so:
Code: Select all
\mnt\tv\Series (2009)\Season 01\Series (2009) - S01E01 - Episode Title
If someone that knows a bit about Python and could do this, that would be awesome, i'm unsure as to what needs to change, but this makes the most sense and should be the easiest way to resolve. Let me know if you have any questions.
Thanks to those working on these auto-downloaders, it really makes life easier.
-Markus
Last edited by markus101 on April 21st, 2009, 3:46 pm, edited 1 time in total.
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: SABnzbd Smart Downloader
Was able to get it to work with an old version of this script (0.71) as it uses a totally different way to compare episodes (a way that I understood and could manipulate). The problem is that it was before the fixes to allow downloading regardless of the show name on disk, ie, the show name is "Series (US)", but SAB saves as "Series (Us)" (unless you manually edited the tvsort.py script to correct this), but even then some shows do not show up properly, shows with "to" in the title are renamed "To" as SAB changes the first character of every word to a capital, even if that is improper grammar wise/How Newzbin shows it.
To make the change if you're interested, change the following line:
to:
I'll keep trying to work with the latest version (any version after 0.8 looks to use almost the same pattern), because both features are important to me, but if anyone that truly understands Python can help, that would be great.
-Markus
To make the change if you're interested, change the following line:
Code: Select all
regex_episode = re.compile(series_title + " - S" + season_number + "E" + episode_number, re.IGNORECASE)
Code: Select all
regex_episode = re.compile("S" + season_number + "E" + episode_number, re.IGNORECASE)
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: SABnzbd Smart Downloader
Got it figured out... easier than I thought, after getting pointed in the right direction.
First in the following section:
Comment out this line:
The next part is a bit more tricky, because you have to comment out an if statement, then un-indent the following 9 rows.
So you end up with the following:
I've added the whole thing to pastebin, just copy everything and paste it over everything in the current SSD-TV.py.
http://pastebin.com/f12d49c8a
This was based off of 0.94. Basically what it does is matches the show name, but when doing a search to compare the results of the match, shows that contained () or ' didn't properly get matched up to the show on Newzbin. I have removed the search/match portion so it only matches the season number and episode number, which is more than enough to match the proper shows, as you are already matching shows in /mnt/tv/Show Name/Season 01 (or whatever your TV dir is).
Hope this helps someone else out.
-Markus
First in the following section:
Code: Select all
def isMissing(nzbDetails):
Code: Select all
tested_episode = tested_episode.replace("(", "\(").replace(")", "\)")
Code: Select all
if re.search(nzbDetails['SeriesName'], seriesname, re.IGNORECASE):
Code: Select all
#if re.search(nzbDetails['SeriesName'], seriesname, re.IGNORECASE):
if seasno == nzbDetails['SeasonNumber_Type' + SeasonType]:
if epno == nzbDetails['EpisodeNumber_Type' + SeasonType]:
if debug:
logger.info("MATCH FOUND: " + "Season " + str(nzbDetails['SeasonNumber']) + ", Episode " + str(nzbDetails['EpisodeNumber']) )
#end if debug
return 0
#end if epno
#end if seasno
#end if seriesname
http://pastebin.com/f12d49c8a
This was based off of 0.94. Basically what it does is matches the show name, but when doing a search to compare the results of the match, shows that contained () or ' didn't properly get matched up to the show on Newzbin. I have removed the search/match portion so it only matches the season number and episode number, which is more than enough to match the proper shows, as you are already matching shows in /mnt/tv/Show Name/Season 01 (or whatever your TV dir is).
Hope this helps someone else out.
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: SABnzbd Smart Downloader
Hi, Apologies for the NOOB question will this script work on Mac Osx or are scripts os specific I see in the code mention of Windows and Linux
TIA
Orinoco
TIA
Orinoco
Re: SABnzbd Smart Downloader
There should be no issue running this on OS X and should be very much like Linux in the setup for it.
-Markus
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: SABnzbd Smart Downloader
Many thanks for the quick reply Markus101
Re: SABnzbd Smart Downloader
Found some other issues, one makes sense and looks to be an issue with thetvdb.com and their API search. The other is driving me nuts, it is failing on the wanted check, looks like only for this show, even though the two strings match perfectly it still manages to say that the show is not wanted.
Show is "Playgrounds" and "Activities" *wink* other shows with and are working fine, just not this particular one, very frustrating, but if anyone has any suggestions I'm listening, it's like the script for this one show thinks 1 == 1 is wrong... 0.71 is having no issues with this one though.
-Markus
Code: Select all
if filename.lower() == nzbDetails['SeriesName'].lower():
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: SABnzbd Smart Downloader
removed solution found
Orinoco
Orinoco
Last edited by orinoco on April 25th, 2009, 5:39 am, edited 1 time in total.
Re: SABnzbd Smart Downloader
Apologies for the noob q here, I am running the script however nothing gets entered into my Queue? From the log 2009-04-25 11:33:22,084 INFO ADD QUEUE: 2009-04-25 11:33:22: http://www.newzbin.com/search/3232070 however this is just a blank search page. Perhaps I have misunderstood I setup a custom search in my account for series xyz season xx I then run this search I hit the RSS feed and have copied the resulting http address into my Feed 1 slot in ssd.cfg the script runs interrogates the folder and notes the missing files however each time it seems to want to add an empty search page to the queue, any help greatly appreciated, the above has no changed after some reading and restarting all of the install from scratch, I now get a
2009-04-25 16:27:39,415 INFO ENTERED isInQueueSmart
2009-04-25 16:27:39,416 INFO FAILED PROCESSING: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Would really appreciate some pointers
TIA
Orinoco
2009-04-25 16:27:39,415 INFO ENTERED isInQueueSmart
2009-04-25 16:27:39,416 INFO FAILED PROCESSING: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Would really appreciate some pointers
TIA
Orinoco
Last edited by orinoco on April 25th, 2009, 10:42 am, edited 1 time in total.
Re: SABnzbd Smart Downloader
That should be exactly what you need to do to. What happens if you just use the default TV search, and select Xvid or x264 (depending on what you want), does that work properly?
I've used a bunch of custom searches before and didn't have any problems, this is very odd.
Can you PM me (or use Pastebin) one of the custom searches you are having issues with, but remove everything at the end of the URL after: as that is your authentication key to logon to Newzbin for RSS Feeds.
-Markus
I've used a bunch of custom searches before and didn't have any problems, this is very odd.
Can you PM me (or use Pastebin) one of the custom searches you are having issues with, but remove everything at the end of the URL after:
Code: Select all
&fauth=
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: SABnzbd Smart Downloader
Could this be causing the issue?
2009-04-26 07:46:40,406
WARNING
[interface] API Key missing, please enter the api key from config>general into your 3rd party program:
The only 3rd party outside of Sabnzbd that I am trying to use is the auto downloader script, as far as I am aware
2009-04-26 07:46:40,406
WARNING
[interface] API Key missing, please enter the api key from config>general into your 3rd party program:
The only 3rd party outside of Sabnzbd that I am trying to use is the auto downloader script, as far as I am aware
Re: SABnzbd Smart Downloader
That does sound like the issue, shouldn't be too difficult to add that part to the script, I'll try to get it added if you don't get it working before that. Haven't used 0.4.9 myself, been using 0.5.0 for so long and the version I'm using doesn't have the API key...
I'll look into this tomorrow if I get a chance.
-Markus
I'll look into this tomorrow if I get a chance.
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: SABnzbd Smart Downloader
Actually you should just be able to edit the config file.
and make it the following (I assume that this is still applied even if your using Newzbin, but I haven't looked at the code).
Hope this helps, let me know though.
-Markus
Code: Select all
ADD_PARAMS = &cat=tv
Code: Select all
ADD_PARAMS = &cat=tv&apikey=enterkeyhere
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: SABnzbd Smart Downloader
Thanks for that just tried it, but still not working still getting the Info failed processing, doesn't appear that it is going off and trying to grab the report, strangely enough it is detecting in the folder that I have it checking that I am missing 4 eps when in fact I am only missing the last 1 that I moved to check the script was working