[Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Come up with a useful post-processing script? Share it here!
lowfi
Newbie
Newbie
Posts: 38
Joined: June 11th, 2008, 7:31 am

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by lowfi »

One thing is not clear to me....

I use sickbeard. So do i set sabtosickbeard.py or htpc_sort.py for tv categories?


Ik keep getting an error when the file has to be finally moved to the complete folder….

Code: Select all

HTPC Sort v2.61 by tret
Error: The download path couldn't be properly determined
this is my settings.ini from htpc_sort:

Code: Select all

[Movies]
destPath = /mnt/Media/Video/Movies
minDownloadSize = 500MB
minFileSize = 200MB
libraryType = video
this is from my sab.ini:

Code: Select all

complete_dir = /mnt/Media
…
[[movies]]
priority = -100
pp = ""
name = movies
script = htpc_sort.py
newzbin = Movies
dir = Video/Movies
I also tried to download everything first in my /home/lowfi/Usenet/Complete folder. I get the same error. Also tried an absolute path in the sab.ini (dir = /mnt/Media/Video/Movies).
Last edited by lowfi on August 18th, 2010, 5:56 pm, edited 1 time in total.
vinister
Jr. Member
Jr. Member
Posts: 53
Joined: March 13th, 2010, 1:38 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by vinister »

I think I have everything setup correctly, on windows 7.

In SAB, I get this error:  Error: The ’settings.ini’ file does not contain a ’alt.binaries.boneless’ section (More)

The downloads in SAB are category "movies"

The movies are downloaded into the correct 'completed' folder that is described in the settings.ini file. 

Any clues?
Some
Newbie
Newbie
Posts: 1
Joined: August 24th, 2010, 6:42 am

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by Some »

Hi there,

Love the potential of this script, but I'm such a noob that I just don't get it yet. Might be that I don't fully understand pathways and Linux yet.

I keep getting this error: "Error: The ’settings.ini’ file does not contain a ’None’ section"

My TV Shows reside on an external drive /media/hdd/TV_Shows
My complete downloads reside at /media/hdd/complete

my Video in settings.ini:

[XBMC]
xbmc = 192.168.0.167:8080
[TV]
destPath = /media/hdd/TV_Shows
minDownloadSize = 100MB
minFileSize = 50MB
libraryType = video

Can someone give me a run through of what I need to be doing?

Thanks.
vinister
Jr. Member
Jr. Member
Posts: 53
Joined: March 13th, 2010, 1:38 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by vinister »

It seems there isn't much support in this thread.

Your error is similar to mine:

Code: Select all

HTPC Sort v2.61 by tret
Error: The 'settings.ini' file does not contain a 'alt.binaries.boneless' section
I think in your case the script thinks whatever you downloaded was assigned a category "NONE".  You probably don't have that category setup in the settings.ini file.  While SAB is downloading, check the category of the download, and make sure it matches one of the categories you have setup in settings.ini

In my case, I have no idea where it is getting the alt.binaries.boneless thing.... I'm stumped.  The downloads are clearly category 'movies'.

Help tret!!
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by tret »

vinister wrote: It seems there isn't much support in this thread.

Your error is similar to mine:

Code: Select all

HTPC Sort v2.61 by tret
Error: The 'settings.ini' file does not contain a 'alt.binaries.boneless' section
I think in your case the script thinks whatever you downloaded was assigned a category "NONE".  You probably don't have that category setup in the settings.ini file.  While SAB is downloading, check the category of the download, and make sure it matches one of the categories you have setup in settings.ini

In my case, I have no idea where it is getting the alt.binaries.boneless thing.... I'm stumped.  The downloads are clearly category 'movies'.

Help tret!!
Hi Guys,

Okay let's start from the beginning here. Post the following items:

OS Version
SABnzbd Version
HTPC Sort Version
HTPC Sort settings.ini
Path to script location
Path to settings.ini location
Screenshot of your SABnzbd categories configuration page
Screenshot of your queue during download of a likely culprit job
Tell me about where SABnzbd puts your downloads before the HTPC Sort script takes over
When the error has happened find out where the download ended up and post the path

I'll try to figure out what's going on based on this information. I have never experienced this issue so I'm having a hard time figuring out why it is happening. The best thing I can do is try to recreate your setup and reproduce the problem.

I'll also consider uploading a debug version of the script for you so you can post the output for me. That may help me narrow it down

tret
Last edited by tret on August 30th, 2010, 2:03 pm, edited 1 time in total.
vinister
Jr. Member
Jr. Member
Posts: 53
Joined: March 13th, 2010, 1:38 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by vinister »

Thanks Tret, I appreciate your efforts.

However my problem is solved.  I switched to using the Couch Potato script.  I prefer having the interface and it takes care of all the moving/renaming of files etc.

Thank you though!
tomdabomb3827
Newbie
Newbie
Posts: 1
Joined: September 4th, 2010, 2:33 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by tomdabomb3827 »

Hey all,

I am running SABnzbd 0.5.4 and htpc_sort v2.61 on FreeNAS 0.7.1

I am receiving the following error when running htpc_sort for TV shows. 

Code: Select all

HTPC Sort v2.61 by tret
Error: The download path couldn't be properly determined
The script works great for movies

Here is my settings.ini:

Code: Select all

[Movies]
destPath = /mnt/Seagate_1_5_TB/Video/Movies
destPath2 = D:\Movies
failPath = /mnt/Seagate_1_5_TB/usenet/downloads
minDownloadSize = 500MB
minFileSize = 200MB
libraryType = video
[TV]
destPath = /mnt/Seagate_1_5_TB/Video/Shows
destPath2 = E:\TV
failPath = /mnt/Seagate_1_5_TB/usenet/downloads
minDownloadSize = 100MB
minFileSize = 50MB
libraryType = video
[Music]
destPath = /mnt/Seagate_1_5_TB/
minFileSize = 750KB
[Videos]
destPath = /mnt/Seagate_1_5_TB/Video/Movies
minFileSize = 1MB
this is from the sabnzbd.log:

Code: Select all

2010-09-04 20:10:29,207::INFO::[postproc:317] unpack_magic finished on showname - 7x09 - episode
2010-09-04 20:10:29,212::INFO::[newsunpack:127] Running external script /mnt/Seagate_1_5_TB/usenet/scripts/htpc_sort.py(/mnt/Seagate_1_5_TB/usenet/downloads/complete/Shows/showname/Season 07, showname - 7x09 - episode.nzb, showname - 7x09 - episode, 5746770, tv, alt.binaries.mom, 2)
2010-09-04 20:10:29,549::INFO::[postproc:466] Cleaning up showname - 7x09 - episode

I noticed a few other people were having this issue.  Has anyone figured it out? Or does anyone see anything wrong with my config?

Thanks,
tomdabomb11
lowfi
Newbie
Newbie
Posts: 38
Joined: June 11th, 2008, 7:31 am

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by lowfi »

lowfi wrote: One thing is not clear to me....

I use sickbeard. So do i set sabtosickbeard.py or htpc_sort.py for tv categories?


Ik keep getting an error when the file has to be finally moved to the complete folder….

Code: Select all

HTPC Sort v2.61 by tret
Error: The download path couldn't be properly determined
this is my settings.ini from htpc_sort:

Code: Select all

[Movies]
destPath = /mnt/Media/Video/Movies
minDownloadSize = 500MB
minFileSize = 200MB
libraryType = video
this is from my sab.ini:

Code: Select all

complete_dir = /mnt/Media
…
[[movies]]
priority = -100
pp = ""
name = movies
script = htpc_sort.py
newzbin = Movies
dir = Video/Movies
I also tried to download everything first in my /home/lowfi/Usenet/Complete folder. I get the same error. Also tried an absolute path in the sab.ini (dir = /mnt/Media/Video/Movies).
Any thoughts on this? these are my cat. settings in sab:

Image
Zenak
Newbie
Newbie
Posts: 2
Joined: September 20th, 2010, 1:43 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by Zenak »

tret wrote:
vinister wrote: It seems there isn't much support in this thread.

Your error is similar to mine:

Code: Select all

HTPC Sort v2.61 by tret
Error: The 'settings.ini' file does not contain a 'alt.binaries.boneless' section
I think in your case the script thinks whatever you downloaded was assigned a category "NONE".  You probably don't have that category setup in the settings.ini file.  While SAB is downloading, check the category of the download, and make sure it matches one of the categories you have setup in settings.ini

In my case, I have no idea where it is getting the alt.binaries.boneless thing.... I'm stumped.  The downloads are clearly category 'movies'.

Help tret!!
Hi Guys,

Okay let's start from the beginning here. Post the following items:

OS Version
SABnzbd Version
HTPC Sort Version
HTPC Sort settings.ini
Path to script location
Path to settings.ini location
Screenshot of your SABnzbd categories configuration page
Screenshot of your queue during download of a likely culprit job
Tell me about where SABnzbd puts your downloads before the HTPC Sort script takes over
When the error has happened find out where the download ended up and post the path

I'll try to figure out what's going on based on this information. I have never experienced this issue so I'm having a hard time figuring out why it is happening. The best thing I can do is try to recreate your setup and reproduce the problem.

I'll also consider uploading a debug version of the script for you so you can post the output for me. That may help me narrow it down

tret
Hi Tret - I also get this error.  it seems as if SAB is passing the NZB group name to the script and the script doesn't know what to do with it.

OS Version - Win 7 x64
SABnzbd Version .5.4
HTPC Sort Version - 2.61
HTPC Sort settings.ini

Code: Select all

[SABnzbd]
address = 192.168.0.141:8080
login = *******
password = ******
apikey = 82a57a*********************0
[SickBeard]
scriptPath = C:\Program Files (x86)\SABnzbd\Scripts\sabToSickBeard.exe
category = TV
[Movies]
destPath = D:\Media Root\Movies
destPath2 = D:\Movies
failPath = D:\Media Root\Failed
minDownloadSize = 500MB
minFileSize = 200MB
libraryType = video
[TV]
destPath = D:\Media Root\TV
destPath2 = C:\TV
failPath = C:\\Media Root\Failed
minDownloadSize = 100MB
minFileSize = 50MB
libraryType = video
[Music]
destPath = D:\Media Root\Music\Downloads (unsorted)
minFileSize = 750KB
[Videos]
destPath = D:\Media Root\Videos
minFileSize = 1MB
Path to script location: C:\Program Files (x86)\SABnzbd\Scripts\
Path to settings.ini location: C:\Program Files (x86)\SABnzbd\Scripts\
Screenshot of your SABnzbd categories configuration page

http://www.dropbox.com/gallery/9535439/ ... d?h=8e8b8b Categories

Screenshot of your queue during download of a likely culprit job

http://www.dropbox.com/gallery/9535439/ ... e8b8b  Queue

Tell me about where SABnzbd puts your downloads before the HTPC Sort script takes over  D:\Media Root\Movies Unsorted or D:\Media Root\MusicUnsorted

When the error has happened find out where the download ended up and post the path: SabNZB movie sorting takes over and the movie is put in the proper folder, renaming is hit or miss. Music obviously isn't renamed at all...
superultra
Newbie
Newbie
Posts: 8
Joined: October 26th, 2008, 1:08 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by superultra »

Weird bug on Ubuntu 10.04 using latest SABZNBD and htpc_sort. Sabznbd is either telling htpc the wrong filesize, or htpc is getting the wrong file size. For example, for an 800mb file:

HTPC Sort v2.61 by tret

Processing: MST3k [192.16 GB]
-----------------------------------------------------------------------------------------------------------------

Error: There is insufficient disk space and the download couldn't be moved

Any ideas?
TracerX
Newbie
Newbie
Posts: 4
Joined: May 3rd, 2009, 11:16 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by TracerX »

lowfi wrote:
lowfi wrote: One thing is not clear to me....

I use sickbeard. So do i set sabtosickbeard.py or htpc_sort.py for tv categories?


Ik keep getting an error when the file has to be finally moved to the complete folder….

Code: Select all

HTPC Sort v2.61 by tret
Error: The download path couldn't be properly determined
this is my settings.ini from htpc_sort:

Code: Select all

[Movies]
destPath = /mnt/Media/Video/Movies
minDownloadSize = 500MB
minFileSize = 200MB
libraryType = video
this is from my sab.ini:

Code: Select all

complete_dir = /mnt/Media
…
[[movies]]
priority = -100
pp = ""
name = movies
script = htpc_sort.py
newzbin = Movies
dir = Video/Movies
I also tried to download everything first in my /home/lowfi/Usenet/Complete folder. I get the same error. Also tried an absolute path in the sab.ini (dir = /mnt/Media/Video/Movies).
Any thoughts on this? these are my cat. settings in sab:

Image
It looks like your category is set to use "Videos/Movies" in the sab.ini. Set that to match your category name instead. I was having the same error and that fixed it for me. The script will move the files to Video/Movies after they have been processed per your settings.ini
lallhands
Newbie
Newbie
Posts: 4
Joined: November 18th, 2011, 9:48 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by lallhands »

Is there a way to modify this script to sort movies by movie rating ?(i.e. MPAA Rated G and PG go to a Family movie folder and PG-13, NC-17, R, and Unrated go to Adult folder). Or is there a better post processing script for this?
sumofatguy
Newbie
Newbie
Posts: 8
Joined: February 23rd, 2009, 11:03 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by sumofatguy »

I installed the script and it works great for me. I haven't played around with it tooooo much yet to see what it can do, however.

I made myself a similar one previously for sorting only HD movies, and I added the function using beautiful soup to pull the proper movie name from the imdb site linked in the nfo file (usually). I'm definitely NOT a programmer, and the code is probably as crude as it can be, but basically what it does is search the nfo file for an imdb link, then pulls the movie name from imdb. I then use the proper movie name when I move it to it's own folder. it works on most movies I've found, feel free to fix it up and use it if you're interested

Code: Select all

def main (movie_dir):	
# find proper movie name from IMDB link, otherwise use folder name
	link = ""
	for file in filter(lambda x: x.lower().endswith('.nfo'), os.listdir(movie_dir)):
		nfo = open(os.path.join(movie_dir, file), "r")
		link = re.findall(".*(http\:\/\/.*?imdb\.com\/title\/tt(?:\d+)\/).*", ''.join(nfo.readlines()))
		nfo.close()
		if len(link) > 0:
			print "Movie Link:", link[0]
			url = urllib2.urlopen(link[0])
			source = url.read()
			soup = BeautifulSoup(''.join(source))
			movie_name = soup.html.head.title.string
	
	# messy way of finding the correct movie name
	if len(link) == 0:
		print "ERROR: no IMDB info found, using folder name instead"
		movie_name = os.path.basename(movie_dir).split(re.search("\d{4}", movie_dir).group())[0].replace(".", " ").title().strip()
		if '720P' in movie_name:
			movie_name = movie_name.split(" 720P")[0]
			
	if '(' in movie_name:
		movie_name = movie_name.split(' (')[0]

	# remove invalid characters
	valid_characters = "()- . %s%s" % (string.ascii_letters, string.digits)
	movie_name = ''.join(c for c in movie_name if c in valid_characters)
	print "Movie name:", movie_name
noxy
Newbie
Newbie
Posts: 2
Joined: April 9th, 2012, 7:06 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by noxy »

How could i get this file onto the installation of sabnzdb i have on my synology nas.. any ideas
Post Reply