sabnzbd / sickbeard / couchpotato pbi's

Status
Not open for further replies.

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
Joshua,

Thanks. Do you see any problems in these configuration screens?
12-26-2012 5-51-35 PM.jpg 12-26-2012 5-52-44 PM.jpg
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
Ok - my apologies. I had missed the step in sabnzbd where we have to specify the Post-Processing Scripts in the 'folders' section, which then makes the python script available in the categories. Live and learn!
It would really be useful if somebody with a fully functioning system could post here the precise entries they have entered in the key dialogue boxes of both sabnzbd and sickbeard though. I am sure that would also prevent questions like mine. There are quite a few instructions one can find on the web for this, but quite a few either miss a number of key steps, or are just wrong (like not having the python script). So it seems to me that this would be a great help to many of us. Thanks!
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
I guess I should have mention v1.1 wasn't fully tested.. I did test some but then built them all as I was changing features but then built them all again and posted them. So stick with v1.0 to avoid pain unless you want to help debug.

thanks for the headsup though, definitely will fix them when I get the chance

I had the same issue with Sickbeard, but it was an easy fix. It simply didn't put sickbeard_enable=YES in rc.conf. Manually adding that solved SB's problems.
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
I apologize again, but I'd really like to solve this folder issue while I still have some spare time (xmas!). The way I understand it ( but please correct me if I'm wrong), there are THREE sets of folders that are used.
  • After sickbeard pushes the desired show info to sabnzbd to find the nzb and download it, sabnzbd first downloads the different parts (e.g. the rar-files) to the FIRST folder named 'incomplete'. In my case that is /Sabnzbd/Incomplete.
  • Once complete, sabnzbd then processes all those temporary files: it repairs them if necessary and possible; and then unpacks them to the SECOND folder, which is called 'complete' (in my case /Sabnzbd/Complete. Since I have assigned the category 'tv' to these shows in sabnzbd 'Categories' section, these files end up in the folder /Sabnzbd/Complete/TVShows. It also automatically creates subfolders for every show with the name of the show.
  • Finally, sabnzbd then runs the python script (sabToSickBeard.py) which sends a signal to SickBeard that it should continue post-processing by renaming the files based on the pattern specified by us in the Post-Processing and Naming sections of the Post Processing Configuration in SickBeard config. That is how they should end up in the THIRD and final so-called 'show folder', which is what things like xbmc or plex can then use. In my case that's /TVShows (which is different - 2 levels higher - from the /Sabnzbd/Complete/TVShows!)
Where I must still go wrong now is in which one of the folders has to be entered where. Here is the error message I still get
Code:
 Loading config from /mnt/plugins/pbi/sickbeard-amd64/SickBeard/autoProcessTV/autoProcessTV.cfg
Opening URL: http://localhost:8081/home/postprocess/processEpisode?nzbName=Name_Show.nzb&quiet=1&dir=%2FTVShows%2FName_Show
Processing folder /TVShows/Name_Show
You're trying to post process an episode that's already been moved to its show dir


Can anybody please tell me where I am still making a mistake? I would really appreciate that!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
running sab 1.0 and sickbeard 1.0 pbis. I accidentally deleted my "television" folder in the Downloads folder. This Downloads/television folder is used as the Television Download folder in Sickbeard. I recreated the "television" folder, but now I'm getting the following error in SAB:

Code:
2012-12-26 14:29:29,384	ERROR:	Post Processing Failed for Hardcore.Pawn.S06E20.480p.HDTV.x264-mSD (Cannot create final folder /usr/pbi/sabnzbd-amd64/data/Downloads/complete/television/Hardcore.Pawn.S06E20.480p.HDTV.x264-mSD)


Code:
2012-12-26 14:29:29,382	ERROR:	Failed making (/usr/pbi/sabnzbd-amd64/data/Downloads/complete/television/Hardcore.Pawn.S06E20.480p.HDTV.x264-mSD)


I thought all these folder permissions were set to "media:media" in the 1.0 PBIs, but now I notice that all of them are 40001:40001. Is this the issue? How can I fix this error?

yes data folder is recursivly owned by media user in the freebsd jail userland. now when you recreated it you may have made i from another user/uid.

what userland are you checking the file ownership from? freenas userland will only know the uid owner/group of the files, it doesn't recognize the jail's users. jail userland should be media:media.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Ok - my apologies. I had missed the step in sabnzbd where we have to specify the Post-Processing Scripts in the 'folders' section, which then makes the python script available in the categories. Live and learn!
It would really be useful if somebody with a fully functioning system could post here the precise entries they have entered in the key dialogue boxes of both sabnzbd and sickbeard though. I am sure that would also prevent questions like mine. There are quite a few instructions one can find on the web for this, but quite a few either miss a number of key steps, or are just wrong (like not having the python script). So it seems to me that this would be a great help to many of us. Thanks!

good instructions have been posted by me / others a few times in this thread but it is becoming much too long / unwieldy. we need to maybe make a new thread just about the plugins and direct regular configuration stuff to the sabnzbd forum. i love helping people, this threads just getting way to long to manage.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I apologize again, but I'd really like to solve this folder issue while I still have some spare time (xmas!). The way I understand it ( but please correct me if I'm wrong), there are THREE sets of folders that are used.
  • After sickbeard pushes the desired show info to sabnzbd to find the nzb and download it, sabnzbd first downloads the different parts (e.g. the rar-files) to the FIRST folder named 'incomplete'. In my case that is /Sabnzbd/Incomplete.
  • Once complete, sabnzbd then processes all those temporary files: it repairs them if necessary and possible; and then unpacks them to the SECOND folder, which is called 'complete' (in my case /Sabnzbd/Complete. Since I have assigned the category 'tv' to these shows in sabnzbd 'Categories' section, these files end up in the folder /Sabnzbd/Complete/TVShows. It also automatically creates subfolders for every show with the name of the show.
  • Finally, sabnzbd then runs the python script (sabToSickBeard.py) which sends a signal to SickBeard that it should continue post-processing by renaming the files based on the pattern specified by us in the Post-Processing and Naming sections of the Post Processing Configuration in SickBeard config. That is how they should end up in the THIRD and final so-called 'show folder', which is what things like xbmc or plex can then use. In my case that's /TVShows (which is different - 2 levels higher - from the /Sabnzbd/Complete/TVShows!)
Where I must still go wrong now is in which one of the folders has to be entered where. Here is the error message I still get
Code:
 Loading config from /mnt/plugins/pbi/sickbeard-amd64/SickBeard/autoProcessTV/autoProcessTV.cfg
Opening URL: http://localhost:8081/home/postprocess/processEpisode?nzbName=Name_Show.nzb&quiet=1&dir=%2FTVShows%2FName_Show
Processing folder /TVShows/Name_Show
You're trying to post process an episode that's already been moved to its show dir


Can anybody please tell me where I am still making a mistake? I would really appreciate that!

The way you explained it is almost exactly correct, though i would change this line.. "It also automatically creates subfolders for every show with the name of the show." too.. "It also automatically creates subfolders for download in the specified category folder", sab doesn't know or care about what show is what, it just downloads files and makes a folder for each download.

It seems as i you entered /TVShows into sickbeard's 'TV Downloads Dir' but this obviously isn't the case.
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
good instructions have been posted by me / others a few times in this thread but it is becoming much too long / unwieldy. we need to maybe make a new thread just about the plugins and direct regular configuration stuff to the sabnzbd forum. i love helping people, this threads just getting way to long to manage.

A lot of the issues that come up here are specific to the FreeNAS installation (permissioning for example, since it gets tricky with the jail vs. non-jail userset). Aside from your suggestion of sending people to the forums for each individual program, some other suggestions:

  • Create a new thread for release announcements and keep using this thread for configuration discussion. Or vice versa -- spin up a new thread for config discussion and keep this for release announcements.
  • Perhaps better, ask if the admins can lock this thread and then spin up two new threads for announcements and configuration discussion.
  • Along with either of the above, create a FAQ thread that links to good answers and see if admins will sticky it. For example, we only need one comment explaining how to setup post processing (or two answers, since there are two ways of doing it -- either let the apps do it, or use sab post-processing scripts). Since nobody seems to search before asking, perhaps a "READ THIS!" sticky FAQ would be more likely to be read.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
A lot of the issues that come up here are specific to the FreeNAS installation (permissioning for example, since it gets tricky with the jail vs. non-jail userset). Aside from your suggestion of sending people to the forums for each individual program, some other suggestions:

  • Create a new thread for release announcements and keep using this thread for configuration discussion. Or vice versa -- spin up a new thread for config discussion and keep this for release announcements.
  • Perhaps better, ask if the admins can lock this thread and then spin up two new threads for announcements and configuration discussion.
  • Along with either of the above, create a FAQ thread that links to good answers and see if admins will sticky it. For example, we only need one comment explaining how to setup post processing (or two answers, since there are two ways of doing it -- either let the apps do it, or use sab post-processing scripts). Since nobody seems to search before asking, perhaps a "READ THIS!" sticky FAQ would be more likely to be read.

I like the ideas you suggested, seperate discussion + release thread + archive this one seems cleanest. FAQ also sounds great, maybe in the near future.
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
Joshua, toddos,

I understand this must be frustrating for you. But believe you me, I have searched both this AND other fora for hours, but the problem is that a search also yields a lot of inaccurate results (people posting wrong configurations - as I have done here in this thread a few times; results for Windows instead of FreeBSD, etc) and that it's not easy to find 'authoritative' answers. And this thread IS indeed extremely unwieldy, as I suggested before. A FAQ with links to 'authoritative' answers (like the ones you refer to in your last message, but without a link) would therefore certainly help. And couldn't you, for the time being just add that to the first message in this thread?

Now on my issue here:
It seems as i you entered /TVShows into sickbeard's 'TV Downloads Dir' but this obviously isn't the case.
It's not clear to me what you're suggesting here and what I should do. My "TV Downloads dir" ("The folder where your download client puts TV downloads.") in SickBeard right now is set to/Sabnzbd/Complete/TVShows. And that IS indeed where sabnzbd puts the files after repacking them (and before deleting them again and sending them on to the /TVShows folder). So are you suggesting that I should change my 'TV Downloads dir' to /TVShows, or that this configuration is correct but doesn't seems to be working? Here is what my SickBeard config.ini says
Code:
cache_dir = cache
root_dirs = 0|/Sabnzbd/Complete/TVShows
tv_download_dir = /Sabnzbd/Complete/TVShows
keep_processed_dir = 0
move_associated_files = 0
process_automatically = 0
rename_episodes = 1
create_missing_show_dirs = 0
add_shows_wo_dir = 0

Can you please specify what exactly is wrong here and how I can fix it?

We really are very grateful for all of your help and patience in both making and updating these plugins and in answering our questi
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Joshua, toddos,

I understand this must be frustrating for you. But believe you me, I have searched both this AND other fora for hours, but the problem is that a search also yields a lot of inaccurate results (people posting wrong configurations - as I have done here in this thread a few times; results for Windows instead of FreeBSD, etc) and that it's not easy to find 'authoritative' answers. And this thread IS indeed extremely unwieldy, as I suggested before. A FAQ with links to 'authoritative' answers (like the ones you refer to in your last message, but without a link) would therefore certainly help. And couldn't you, for the time being just add that to the first message in this thread?

Now on my issue here:

It's not clear to me what you're suggesting here and what I should do. My "TV Downloads dir" ("The folder where your download client puts TV downloads.") in SickBeard right now is set to/Sabnzbd/Complete/TVShows. And that IS indeed where sabnzbd puts the files after repacking them (and before deleting them again and sending them on to the /TVShows folder). So are you suggesting that I should change my 'TV Downloads dir' to /TVShows, or that this configuration is correct but doesn't seems to be working? Here is what my SickBeard config.ini says
Code:
cache_dir = cache
root_dirs = 0|/Sabnzbd/Complete/TVShows
tv_download_dir = /Sabnzbd/Complete/TVShows
keep_processed_dir = 0
move_associated_files = 0
process_automatically = 0
rename_episodes = 1
create_missing_show_dirs = 0
add_shows_wo_dir = 0

Can you please specify what exactly is wrong here and how I can fix it?

We really are very grateful for all of your help and patience in both making and updating these plugins and in answering our questi

I suggested that what you had entered was correct and the error message you were getting didn't seem right compared to what configuration you had showed earlier.

EDIT
I checked my sickbeard config (mind you this is on a freebsd jail on pfsense not freenas) and this is what I had (though this was all generated from the gui)
Code:
root_dirs = 0|/mnt/media/videos/tvshows
tv_download_dir = /mnt/media/downloads-complete/tvshows

notice my root_dir (which i believe is set when you choose where to put your tv shows) is not the same as my tv_download_dir

when you added your shows in sickbeard did you choose '/TVShows' (in your case)
You might want to look into sickbeard's home > addshows
maybe backup your data folder then go into sickbeard and change the default folder for shows to '/TVShows'

remember sabnzbd complete folder is category/download while sickbeard is organized by tvshow
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
As I alluded to, I don't use any post-processing scripts in SAB. Instead, I do this.

The two things I don't cover there are setting up your download folder in SAB (I don't use the default) and permissions. The former should be obvious how it's done if you look at the SAB configs. The latter is trickier. I have the folders on my media tank ZFS dataset all set to 777, and then within each app there are different ways to set chmod/umask values. Some, like SAB and CP, let you do that from the UI. Some, like SB, don't require any changes at all (SB uses a move command rather than a copy command, which preserves permissions). Some, like HP, require you to modify the config.ini file manually (make sure you stop the running instance before doing this, or an in-memory copy of the running config.ini may overwrite any changes you make). And some, like LazyLibrarian, don't have any way to configure the option at all (the code itself attempts a chmod 777 with no way to override it). Of course all of those assume you have your target directories configured correctly in the first place.

If you're insistent upon using SAB's post processing, I can't help you. I've never used it, and I see no reason to use it. SAB should handle downloading, because that's what it's designed to do. SB, CP, etc should handle post-processing those downloads, because that's what they're designed to do. There's no reason SAB needs to tell them, "Hey, a download's done, come and get it," because they should be monitoring the download folder on their own. Yes, it may save a couple of seconds for SAB to notify them rather than wait for the next scan, but you just spent minutes or longer downloading. A few extra seconds aren't going to harm anything.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@toddos
I personalty prefer post processing scripts because they run as soon as it's done downloading, I've used them for sickbeard on at least a dozen systems I've setup for myself or others and never had a problem I couldn't fix during initial setup.
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
@toddos
I personalty prefer post processing scripts because they run as soon as it's done downloading, I've used them for sickbeard on at least a dozen systems I've setup for myself or others and never had a problem I couldn't fix during initial setup.

Dif'rent strokes. That's why I suggested there were two different ways to approach this. I like the other way. It feels more ... unixy, to coin a word. Each app does what it's good at doing, and inputs and outputs are "chained". SAB is good at downloading, so it downloads. Sickbeard is good at renaming, so it renames.

That said, I'm probably going to end up writing a simple post-processing script for LazyLibrary downloads, since the current post-processing it has is subpar and I want it to do something completely different (I want it to move files into a drop folder that an instance of Calibre watches for importing, and I don't want it to pull covers, create .opf files, etc -- that's what Calibre's for).
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Dif'rent strokes. That's why I suggested there were two different ways to approach this. I like the other way. It feels more ... unixy, to coin a word. Each app does what it's good at doing, and inputs and outputs are "chained". SAB is good at downloading, so it downloads. Sickbeard is good at renaming, so it renames.

That said, I'm probably going to end up writing a simple post-processing script for LazyLibrary downloads, since the current post-processing it has is subpar and I want it to do something completely different (I want it to move files into a drop folder that an instance of Calibre watches for importing, and I don't want it to pull covers, create .opf files, etc -- that's what Calibre's for).

do you have calibre setup for freebsd? I was thinking of messing around with it but started collecting up the dependencies and got scared off.
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
do you have calibre setup for freebsd? I was thinking of messing around with it but started collecting up the dependencies and got scared off.

I store my library on a share on my NAS, but I run calibre-server off of a WHS2011 VM hosted on a different machine, and run the GUI on a Win8 laptop (the gui does the importing, not the server -- for now, the server is read-only, though apparently write functionality is in the works).

While calibre does have a lot of dependencies, including things you wouldn't want in FreeNAS like QT, you could probably hack it down just to the calibre-server functionality. I'm not sure how useful that would be, though. Also, the weekly update model of calibre would mean investing in an update script similar to (but probably much more complicated than) the one that exists for SAB.
 

calgarychris

Contributor
Joined
Aug 27, 2011
Messages
124
If I'm not too late to voice an opinion, may I suggest that we get the "how-to" added to the official Freenas documentation in the plugins section? I tend to agree that it's getting tough to scroll through 74 pages of questions, queries and answers to find the gems (I know page 26ish was a good one). I'd recommend a cut and paste of toddos setup, along with the more traditional post processing one and there's a couple of good posts on how to update the pbi's that I know I found helpful.

Just my two cents...but it might save you some questions...

I've said it before, I'll say it again - thanks again for the fantastic work
 

erode

Dabbler
Joined
Dec 21, 2012
Messages
16
New question:

What changes if any were made to sabToSickBeard.py for post processing scripts? I am looking to add in (https://github.com/clinton-hall/nzbToMedia) to support CouchPotato rather than letting it poll a directory. Just wondering if you guys have played with this and if it's directly compatible with how we do it here.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
New question:

What changes if any were made to sabToSickBeard.py for post processing scripts? I am looking to add in (https://github.com/clinton-hall/nzbToMedia) to support CouchPotato rather than letting it poll a directory. Just wondering if you guys have played with this and if it's directly compatible with how we do it here.

No changes, all the files are directly from the respective githubs. I just add the init + dependencies
interesting, gotta look into that script. maybe test it out with my couchpotato setup
 
Status
Not open for further replies.
Top