sabnzbd / sickbeard / couchpotato pbi's

Status
Not open for further replies.

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
Can somebody tell me how to get autoprocessTV working with Sab and sickbeard? (line by line in SSH as Root).

Then, what do I need to do in my settings for SAB and my settings for SickBeard, to make it happen?

EDIT/UPDATE

The previous threads I found here didn't seem to work. Neither did anything else I could find on the net. What I'm resulting to now is for SickBeard to scan the SAB download directory, and process the files there...

However, I'm now getting this error in my log:

Code:
Dec-01 13:41:18 ERROR    POSTPROCESSER :: Exception generated in thread POSTPROCESSER: 13
Dec-01 13:41:17 ERROR    POSTPROCESSER :: Unable to move file ...******.mkv to ...YYYYY.mkv: 13


Anyone have any ideas? I'm sure it's a permissiong thing, but I'm not sure what to do to fix it. It's going from a jail location to a mounted non-jail location.
 

Guy Lian

Dabbler
Joined
Nov 23, 2012
Messages
14
Can somebody tell me how to get autoprocessTV working with Sab and sickbeard? (line by line in SSH as Root).

Then, what do I need to do in my settings for SAB and my settings for SickBeard, to make it happen?
You need to configure both SABnzbd and Sick Beard to talk to each other. It's not a simple one-way configuration.

First off, have a read of the following:
http://sickbeard.com/config.html
http://code.google.com/p/sickbeard/wiki/PostProcessing
http://wiki.sabnzbd.org/user-scripts
http://wiki.sabnzbd.org/configure-categories

Getting SABnzbd and Sick Beard to work together takes a few steps, and requires copying a script from Sick Beard to SABnzbd.

* At the command line, create a folder to hold the SABnzbd scripts, and make sure that the folder's permissions are set appropriately. If the folder doesn't exist, or has incorrect permissions, SABnzbd will not be able to use it. I have all of my SABnzbd folders in the same tree inside the jail (/usr/pbi/sabnzbd-amd64/data/Downloads - see reply #653 on the previous page for more details of my setup) but feel free to choose a location which suits your purposes.

* At the command line again, copy the entire contents of the Sick Beard autoProcessTV folder (on my system it's sickbeard-amd64/SickBeard/autoProcessTV) to the SABnzbd scripts folder you created in the previous step.

* Still at the command line, go into the SABnzbd scripts folder you created in the first step and rename (or copy) autoProcessTV.cfg.sample to autoProcessTV.cfg. This file tells SABnzbd how to talk to Sick Beard, and requires some editing. Use ee or vi to edit this file (see elsewhere for instructions on how to use ee or vi).
Code:
[SickBeard]
host=localhost	<-- This is Sick Beard's host, not SABnzbd's. If SABnzbd and Sick Beard are on the same system (or same jail) then leave this line alone. Otherwise, change "localhost" to the hostname or IP address of the system running Sick Beard.
port=8081	<-- This is Sick Beard's default port. If you haven't changed it in Sick Beard's GUI, then leave it alone here. Otherwise, change "8081" to whatever port Sick Beard uses.
username=	<-- This is Sick Beard's login username.
password=	<-- This is Sick Beard's password for the username in the line above.
web_root=	<-- leave this blank
ssl=0		<-- Leave this line alone unless you have enabled SSL in Sick Beard's GUI. If you have enabled SSL for Sick Beard then change "0" to "1".


* In SABnzbd's GUI, under Config -> General, make sure that API Key is configured. Click on Generate New Key to generate a random API key if one isn't already there. This is needed to let other programs, such as Sick Beard, interact with SABnzbd. Make a note of the API Key, or copy it to the clipboard.

* In SABnzbd's GUI, under Config -> Folders, make sure the Post-Processing Scripts Folder option is configured with the path to the scripts folder (either relative or absolute, depending on your setup). If you don't configure this item, then the Script column will not appear under Categories.

* In SABnzbd's GUI, under Config -> Categories, make sure you can see a column called Script. If you can't see a Script column, go back through the previous steps.

* If can see a Script column, then create a new category (on my system it's called tv) and select sabToSickBeard.py in the Script column. Remember the category name; you'll need it when configuring Sick Beard. Leave the other columns as they are for now; they can be changed later as you become more familiar with SABnzbd and Sick Beard. Click Add when done.

* Now go to Sick Beard's GUI, to the Config -> Search Settings page. Change NZB Method: to SABnzbd. If both SABnzbd and Sick Beard are on the same system (or the same jail), then leave SABnzbd URL alone, otherwise change it to point to the system running SABnzbd. Set both SABnzbd Username and SABnzbd Password to whatever credentials you use for SABnzbd (or leave blank if you haven't password-protected SABnzbd). Set SABnzbd API Key to the SABnzbd API key you created earlier. Finally, set SABnzbd Category to the category you created in SABnzbd in the previous step. I don't know if it's case-sensitive, but I've used all lower-case categories on my system.

* Finally, if you keep your downloaded TV shows in a separate folder (e.g. for use with MiniDLNA or similar) then, still in Sick Beard's GUI, go to Config -> Post Processing and set TV Download Dir to the path of your TV shows folder. As before, make sure the permissions on the target folder are suitable for Sick Beard.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
Ok I feel like I've tried everything in the world now, but no luck... haha.

I read through all the many permissions issues in this 67 page thread and still no luck!

I'm open to anything here, please help. I'll need line-by-line what to try though. Thanks anyone.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
I do it even simpler.

In SAB:

  • Don't set up any scripts folder
  • Set up categories for TV, Movies, and Music, with Priority and Processing as Default, folder as the folder where you want these to go under your SAB download directory, and groups/indexer tags as TV, Movies, and Music respectively.
  • Create the folders in the download directory, or don't and let SAB do it automatically
  • If you're going to use the blackhole (which you shouldn't with SB/CP/HP -- let them use the API), go ahead and create subfolders in the blackhole for your categories. NZBs dropped into the subfolders will pick up the subfolder name as their category.

In Sickbeard:
  • In Search Settings, when setting up Sickbeard to talk to SAB using your API key, set the category to TV
  • Under Post-Processing, set the "TV Download Dir" to the download/TV path SAB writes to.
  • Check the "Scan and Process" checkbox

Sickbeard will now watch that folder and process anything that lands there into the appropriate path for the TV show it identifies.

In CouchPotato:
  • In the Downloaders section, set the category for SAB to Movies
  • In the Renamer section, turn on the Renamer
  • Set the From folder to the download/Movies folder from SAB, and the To folder for the root of your Movies storage

CouchPotato will now watch the Movies download folder and process movies out of it into their correct locations.

For HeadPhones:
  • In Download Settings, set the SAB category to Music and set the Music Download Directory to the download/Music path from above
  • In Quality & Post-Processing, tick the "Move downloads to Destination Folder" checkbox and the "Rename files" checkbox
  • Set the destination folder to the root of your music storage, and set any other options you like

Headphones will now watch the Music download folder and process downloads out of that into your music storage under the correct artist/album path.

I get that a long time ago sickbeard and others didn't have their own post-processors, or what they did have wasn't all that good. But that's no longer the case, and they all work flawlessly for me. Let the app that knows about the content do the moving, not SAB. SAB should just download into a deterministic location.

I've tried this but I get some errors during SickBeard's post processing - it can't move the source file to its final location. How can I fix that?
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
You need to configure both SABnzbd and Sick Beard to talk to each other. It's not a simple one-way configuration.

First off, have a read of the following:
http://sickbeard.com/config.html
http://code.google.com/p/sickbeard/wiki/PostProcessing
http://wiki.sabnzbd.org/user-scripts
http://wiki.sabnzbd.org/configure-categories

Getting SABnzbd and Sick Beard to work together takes a few steps, and requires copying a script from Sick Beard to SABnzbd.

* At the command line, create a folder to hold the SABnzbd scripts, and make sure that the folder's permissions are set appropriately. If the folder doesn't exist, or has incorrect permissions, SABnzbd will not be able to use it. I have all of my SABnzbd folders in the same tree inside the jail (/usr/pbi/sabnzbd-amd64/data/Downloads - see reply #653 on the previous page for more details of my setup) but feel free to choose a location which suits your purposes.

* At the command line again, copy the entire contents of the Sick Beard autoProcessTV folder (on my system it's sickbeard-amd64/SickBeard/autoProcessTV) to the SABnzbd scripts folder you created in the previous step.

* Still at the command line, go into the SABnzbd scripts folder you created in the first step and rename (or copy) autoProcessTV.cfg.sample to autoProcessTV.cfg. This file tells SABnzbd how to talk to Sick Beard, and requires some editing. Use ee or vi to edit this file (see elsewhere for instructions on how to use ee or vi).
Code:
[SickBeard]
host=localhost	<-- This is Sick Beard's host, not SABnzbd's. If SABnzbd and Sick Beard are on the same system (or same jail) then leave this line alone. Otherwise, change "localhost" to the hostname or IP address of the system running Sick Beard.
port=8081	<-- This is Sick Beard's default port. If you haven't changed it in Sick Beard's GUI, then leave it alone here. Otherwise, change "8081" to whatever port Sick Beard uses.
username=	<-- This is Sick Beard's login username.
password=	<-- This is Sick Beard's password for the username in the line above.
web_root=	<-- leave this blank
ssl=0		<-- Leave this line alone unless you have enabled SSL in Sick Beard's GUI. If you have enabled SSL for Sick Beard then change "0" to "1".


* In SABnzbd's GUI, under Config -> General, make sure that API Key is configured. Click on Generate New Key to generate a random API key if one isn't already there. This is needed to let other programs, such as Sick Beard, interact with SABnzbd. Make a note of the API Key, or copy it to the clipboard.

* In SABnzbd's GUI, under Config -> Folders, make sure the Post-Processing Scripts Folder option is configured with the path to the scripts folder (either relative or absolute, depending on your setup). If you don't configure this item, then the Script column will not appear under Categories.

* In SABnzbd's GUI, under Config -> Categories, make sure you can see a column called Script. If you can't see a Script column, go back through the previous steps.

* If can see a Script column, then create a new category (on my system it's called tv) and select sabToSickBeard.py in the Script column. Remember the category name; you'll need it when configuring Sick Beard. Leave the other columns as they are for now; they can be changed later as you become more familiar with SABnzbd and Sick Beard. Click Add when done.

* Now go to Sick Beard's GUI, to the Config -> Search Settings page. Change NZB Method: to SABnzbd. If both SABnzbd and Sick Beard are on the same system (or the same jail), then leave SABnzbd URL alone, otherwise change it to point to the system running SABnzbd. Set both SABnzbd Username and SABnzbd Password to whatever credentials you use for SABnzbd (or leave blank if you haven't password-protected SABnzbd). Set SABnzbd API Key to the SABnzbd API key you created earlier. Finally, set SABnzbd Category to the category you created in SABnzbd in the previous step. I don't know if it's case-sensitive, but I've used all lower-case categories on my system.

* Finally, if you keep your downloaded TV shows in a separate folder (e.g. for use with MiniDLNA or similar) then, still in Sick Beard's GUI, go to Config -> Post Processing and set TV Download Dir to the path of your TV shows folder. As before, make sure the permissions on the target folder are suitable for Sick Beard.

So this is actually exactly what I tried. However, I do not know how to confirm that the permissions are correct (or what they are in the first place). I literally have set everything to 777 right now (using chmod -R 777). But how about owners? How can I check an owner, and how can I change it? What should the owner of everything be?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I've tried this but I get some errors during SickBeard's post processing - it can't move the source file to its final location. How can I fix that?

If it can't move the file it is very likely permissions. Where is the source final directory?
'chown -R media:media /source/directory'
'chown -R media:media /final/directory'
you can test now with..
'su media'
'cat /file/in/source/directory'
'touch /file/in/final/directory'
Remember the commands above are when you are on a shell in the jail

you also want to look at the permissions sabnzbd is making the files (it's a setting in sabnzbd).
Goodluck
 

calgarychris

Contributor
Joined
Aug 27, 2011
Messages
124
Hi guys,

I've had all three of these working (currently using 0.8 PBIs with 8.2-Release), however on reboot, Couchpotato refuses to work. I haven't changed any of the configs, it seems to be the reboot that screws things up. CP is on port 8082 and I've had the "enable" entry in rc.conf and have tried taking it out as well and starting manually.

I've tried the gui (consistently doesn't work, checked with a webpage refresh), I've tried "service couchpotato onestart" with the message that it starts successfully but then doesn't appear to be listening to port 8082.

I've tried typing "ps waux | grep headphones" which gives the following output (but I don't know how to interpret it)

root 3237 0.0 0.3 78236 24376 ?? IsJ 10:10PM 0:01.70 /usr/pbi/couch
potato-amd64/bin/python /usr/pbi/couchpotato-amd64/
root 4933 0.0 0.0 9128 1352 0 R+J 11:37PM 0:00.00 grep couchpota
to


Sockstat (again, don't know how to interpret it but CP isn't there - interestingly I don't know what the PIDs 3237, 3231 and 3226 might be?)
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
sickbeard python 4154 4 tcp4 *:8081 *:*
sickbeard python 4154 5 tcp4 192.168.1.111:8081 192.168.1.27:56482
sabnzbd python 3626 8 tcp6 ::1:8080 *:*
sabnzbd python 3626 9 tcp4 *:8080 *:*
root python 3237 3 tcp4 192.168.1.111:12348 *:*
root python 3231 3 tcp4 192.168.1.111:12347 *:*
root python 3226 3 tcp4 192.168.1.111:12346 *:*
root cron 3091 4 dgram -> /var/run/logpriv
root syslogd 2931 4 dgram /var/run/log
root syslogd 2931 5 dgram /var/run/logpriv

Netstat (again I would have expected to see port 8082)

netstat: kvm not available: /dev/mem: No such file or directory
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 192.168.1.111.8081 imac.home.gatewa.56482 ESTABLISHED
Active UNIX domain sockets
Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr
ffffff0005e1ed20 dgram 0 0 0 ffffff0005e271e0 0
0
ffffff0005e271e0 dgram 0 0 ffffff019046d1d8 0 ffffff0005e1ed20
0 /var/run/logpriv
ffffff0005e270f0 dgram 0 0 ffffff019046d3b0 0 0
0 /var/run/log



Apologies if this is a repeat of a problem, I've gone through many many of the forum pages, can anyone suggest what I'm doing wrong here?

Thanks
Chris
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi guys,

I've had all three of these working (currently using 0.8 PBIs with 8.2-Release), however on reboot, Couchpotato refuses to work. I haven't changed any of the configs, it seems to be the reboot that screws things up. CP is on port 8082 and I've had the "enable" entry in rc.conf and have tried taking it out as well and starting manually.

I've tried the gui (consistently doesn't work, checked with a webpage refresh), I've tried "service couchpotato onestart" with the message that it starts successfully but then doesn't appear to be listening to port 8082.

I've tried typing "ps waux | grep headphones" which gives the following output (but I don't know how to interpret it)

root 3237 0.0 0.3 78236 24376 ?? IsJ 10:10PM 0:01.70 /usr/pbi/couch
potato-amd64/bin/python /usr/pbi/couchpotato-amd64/
root 4933 0.0 0.0 9128 1352 0 R+J 11:37PM 0:00.00 grep couchpota
to


Sockstat (again, don't know how to interpret it but CP isn't there - interestingly I don't know what the PIDs 3237, 3231 and 3226 might be?)
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
sickbeard python 4154 4 tcp4 *:8081 *:*
sickbeard python 4154 5 tcp4 192.168.1.111:8081 192.168.1.27:56482
sabnzbd python 3626 8 tcp6 ::1:8080 *:*
sabnzbd python 3626 9 tcp4 *:8080 *:*
root python 3237 3 tcp4 192.168.1.111:12348 *:*
root python 3231 3 tcp4 192.168.1.111:12347 *:*
root python 3226 3 tcp4 192.168.1.111:12346 *:*
root cron 3091 4 dgram -> /var/run/logpriv
root syslogd 2931 4 dgram /var/run/log
root syslogd 2931 5 dgram /var/run/logpriv

Netstat (again I would have expected to see port 8082)

netstat: kvm not available: /dev/mem: No such file or directory
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 192.168.1.111.8081 imac.home.gatewa.56482 ESTABLISHED
Active UNIX domain sockets
Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr
ffffff0005e1ed20 dgram 0 0 0 ffffff0005e271e0 0
0
ffffff0005e271e0 dgram 0 0 ffffff019046d1d8 0 ffffff0005e1ed20
0 /var/run/logpriv
ffffff0005e270f0 dgram 0 0 ffffff019046d3b0 0 0
0 /var/run/log



Apologies if this is a repeat of a problem, I've gone through many many of the forum pages, can anyone suggest what I'm doing wrong here?

Thanks
Chris

might be uncleaned pidfiles leftover. You can check 'service couchpotato status' and if it says it's started, while you 'ps aux' says it's not, then that's your problem. delete the leftover pidfiles. v1.0 does this for you and has log to check for / cleanup stale pidfiles.
 

calgarychris

Contributor
Joined
Aug 27, 2011
Messages
124
might be uncleaned pidfiles leftover. You can check 'service couchpotato status' and if it says it's started, while you 'ps aux' says it's not, then that's your problem. delete the leftover pidfiles. v1.0 does this for you and has log to check for / cleanup stale pidfiles.

Thanks - I'll delete everything and start with 1.0. It was time for an upgrade anyways! Just to confirm, there's no issues with v1.0 running on FN8.3?

Thanks
Chris
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks - I'll delete everything and start with 1.0. It was time for an upgrade anyways! Just to confirm, there's no issues with v1.0 running on FN8.3?

Thanks
Chris

Nope, v1.0 was built on 8.3
 

neto_hugo

Explorer
Joined
Mar 6, 2012
Messages
87
Hi guys,

I think I'm having problems with the permissions on the folders.
Sick + Head + Couch are sending the downloads for Sab, and everything its okay.

ERRORS are not showing up in the Sick's log (i.e.), but when I look inside the folders that I created they are renamed as showed in the image below:




And if a try to delete any folder in windows (i.e), its not possible...

I also made sure that all folders under both /media and /usr/pbi/sabnzbd-amd64/data/Downloads inside the jail (note: NOT outside the jail) were chowned to media:media and chmodded to 755.

What would be the complete code for this your suggestion? I'm using the same tree structure that you. I belive its the only thing that is missing here...because I was able to make the mount points, but they are empty exactly because they are not being renamed by the programs before they are put there, right?

Thanks to all
 

jumpy

Explorer
Joined
Nov 3, 2012
Messages
84
I installed all of the pbi's. i got all of them working except sabnzbd. i got to the wizard, it kept timing out when trying to connect to my newsgroup server. i just put the right info in and moved on after trying every possible server/port my newsgroup offers. finished it. then tried to connect, and it wouldn't load.

should i just delete the plugin and retry?

also, do i ignore the update remarks on sickbeard/maraschino/etc? i noticed you put a command to update sabnzbd
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
I installed all of the pbi's. i got all of them working except sabnzbd. i got to the wizard, it kept timing out when trying to connect to my newsgroup server. i just put the right info in and moved on after trying every possible server/port my newsgroup offers. finished it. then tried to connect, and it wouldn't load.

should i just delete the plugin and retry?

also, do i ignore the update remarks on sickbeard/maraschino/etc? i noticed you put a command to update sabnzbd

Can you ping your usenet server from the jail? There might be some networking issue with your network that's preventing it from calling out. It shouldn't be a problem with FreeNAS itself, though, if you can get to the sab web page (thus the jail's IP has a valid route, one of the more common failures when setting up jails).

As for updating, sickbeard, couchpotato, and headphones all have built-in updating via git, and you can and should use that functionality. I don't know about maraschino since I don't use it. Sab is the only one that doesn't have a built-in update mechanism, which is why there's a separate script provided with the pbi to update it as needed.
 

jumpy

Explorer
Joined
Nov 3, 2012
Messages
84
ah i see. okay. i didn't see how to ping the jail in the video, but i may have just missed it.

i can access all of the other pages, the only thing i cant access is the SABnzbd. so is pinging really the problem?
 

markf

Cadet
Joined
Oct 25, 2012
Messages
7
Hi Josua,

I'm getting random downloads from CP using your 1.0 plugin, so I thought i'd update the core python to latest git version.
However, upon starting up the plugin, and going to the CP page, it jumps to the wizard, but the body block contains no content, so i can't configure it.

My question is, did you have to apply any changes to the couchpotato core application to make it work as a PBI?

Ideally i'd like to quickly and easily update CP from git source by just scp'ing in the latest python source.
I'm assuming the code around the CP code is just to enable it as a plugin, but essentially the source should work as-is, or did you have to tweak it?

According to the version string in the CouchPotato/ dir it's "2.0.0.pre1", but comparing that entire dir to that tag in git gives masses of differences, so I'm having trouble finding any changes you may have made that I need to do.

cheers,
mark
 

markf

Cadet
Joined
Oct 25, 2012
Messages
7
ok, scratch this, got it working.
My rsync wasn't copying everything, but using straight scp was fine.

How I got it updated for anyone else:

Code:
cd /usr/pbi/couchpotato-amd64
mv CouchPotato CouchPotato.001
mkdir CouchPotato
chmod 777 CouchPotato
chown media:media CouchPotato

# remote machine
scp -r CouchPotatoServer/* user@nas:/usr/pbi/couchpotato-amd64/CouchPotato/

# startup plugin as normal and go to main page and configure
 

jpaytoncfd

Cadet
Joined
Dec 8, 2012
Messages
4
I think the work done here is awesome. However I cant make it work. When I try to start the services I just see "Some error occurred".

Its actually all of the plugins. Is there a better setup guide for beginning to end? everything is too old.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I think the work done here is awesome. However I cant make it work. When I try to start the services I just see "Some error occurred".

Its actually all of the plugins. Is there a better setup guide for beginning to end? everything is too old.

Too old? how does that affect whether the plugins install correctly?
I just installed the version 1.0 plugins on a freenas8.3 jail and it worked just fine for me.
what version plugins / pluginjail. We can debug from there.
 

fyver

Dabbler
Joined
Apr 23, 2012
Messages
21
Somehow I managed to get theSickbeard TPB branch working but now because of a disk crash i needed to reinstall everything and now I can't remember how I did it.

Would it please be possible to make a PBI of the TPB branch? I think it is alot more useful than the normal version of Sickbeard.

Or maybe someone figured it out to get the TPB version working?

I hope someone can help me.
 

fyver

Dabbler
Joined
Apr 23, 2012
Messages
21
OK, I fixed it ;).

INSTRUCTIONS FOR TPB Edition:
1) Install the PBI
2) Got to the folder 'sickbeard-amd64' on your freenas system
3) Open the Sickbeard folder
4) In this folder DELETE everything EXCEPT the sickbeard folder.
5) Download sickbeard-TPB source
6) Copy everything EXCEPT the 'sickbeard folder' to the 'Sickbeard' folder on your system (the one were you just deleted everything except the sickbeard folder)
7) Go to the sickbeard Webadress, the layout might be a bit wrong but at the top it will still say to 'update sickbeard'
8) Click to start the updating and let it run for a couple of minutes
9) Go back to the sickbeard webadress and You TPB setup is ready to be used!

If you have any questions you can just ask me;)
 
Status
Not open for further replies.
Top