Media Rover

Got a program that plays well with SABnzbd? Share it here!
pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Media Rover

Post by pilGrim »

Hi Kierse,

All was working fine but for some reason I am now getting the following error on my sorts: (from SABnzbd download and unpack history)

> python mediarover.py episode-sort /path/to/some.download some.download.nzb some.download 12345 tv alt.public.access.tv 0 (More)

clicking more gives me:

2010-10-19 21:56 INFO - --- STARTING --- - __init__.py:622
ERROR: incorrect number of arguments!
Usage: mediarover.py episode-sort [options] result_dir [nzb_name nice_name newzbin_id category newsgroup status] [low|medium|high]

Description: process a recent download and sort episode file in appropriate
series folder

Options:
 -c /PATH/TO/CONFIG/DIR, --config=/PATH/TO/CONFIG/DIR
                       path to application configuration directory
 -d, --dry-run         simulate downloading nzb's from configured sources
 -h, --help            show this help message and exit


I do have two different tv show directories configured in my mediarover config, but the shows in question should all default to the same directory that has worked for other downloads.  I did not change anything so any ideas here as to why it is not passing over the right number of arguments?

Greg
Last edited by pilGrim on October 19th, 2010, 10:31 am, edited 1 time in total.

pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Media Rover

Post by pilGrim »

Hi Kierse,

Just one more update on this issue... I reinstalled everything (deleted test file, new logs) and the problem still occurred.  Then I noticed that a mediarover schedule happened right after my test and my test file was put into the queue as it was missing.  The second time the source was picked up from Newzbin.com versus NZBs.org (manually downloaded nzb for test).  The newzbin.com file sorted properly with alias used.

So it looks like the issue maybe the new quality settings with a NZBs.org file which had the following naming convention:

Show.Name.S07E05.HDTV.XviD-LOL

Could all the stuff after s07e05 be part of the problem?  I will set my first rss to newzbin.com to see if this eliminates the issues on most dls.

Sure you are busy, so just shout back when you can.

Cheers,

Greg
Last edited by pilGrim on October 23rd, 2010, 2:01 am, edited 1 time in total.

g1zm0
Newbie
Newbie
Posts: 24
Joined: February 7th, 2010, 7:57 am

Re: Media Rover

Post by g1zm0 »

Hi Kierse,

Small problem, probably something simple. The episode sort script isnt delivering the episodes to the correct location. I have 3 TV drives and everything is being dumped onto the second one regardless of existing folders.

Here is the log from SABNZBD

Code: Select all

An Idiot Abroad S01E08 WS PDTV XviD aAF

2010-11-14 14:29 INFO - --- STARTING --- - episode_sort.py:138
2010-11-14 14:29 INFO - begin processing tv directory: /Volumes/TV II/TV II - series.py:493
2010-11-14 14:29 INFO - begin processing tv directory: /Volumes/TV III/TV III - series.py:493
2010-11-14 14:29 INFO - begin processing tv directory: /Volumes/TV I/TV I - series.py:493
2010-11-14 14:29 INFO - watching 36 tv show(s) - episode_sort.py:242
2010-11-14 14:29 INFO - found download file at '/Users/plex/downloads/complete/TV/An Idiot Abroad S01E08 WS PDTV XviD aAF/aaf-an.idiot.abroad.s01e08.pdtv.avi' - episode_sort.py:271
2010-11-14 14:29 INFO - scanning filesystem for episodes belonging to 'An Idiot Abroad'... - series.py:256
2010-11-14 14:29 INFO - attempting to move episode file... - episode_sort.py:361
2010-11-14 14:30 INFO - downloaded episode moved from '/Users/plex/downloads/complete/TV/An Idiot Abroad S01E08 WS PDTV XviD aAF/aaf-an.idiot.abroad.s01e08.pdtv.avi' to '/Volumes/TV II/TV II/An Idiot Abroad/Season 01/s01e08.avi' - episode_sort.py:370
2010-11-14 14:30 INFO - scanning filesystem for episodes belonging to 'An Idiot Abroad'... - series.py:256
2010-11-14 14:30 INFO - checking filesystem for duplicate or multipart episode redundancies... - episode_sort.py:394
2010-11-14 14:30 INFO - cleaning path '/Users/plex/downloads/complete/TV/An Idiot Abroad S01E08 WS PDTV XviD aAF' of the extensions ['nfo', 'txt', 'sfv', 'srt', 'nzb', 'idx', 'log', 'par', 'par2', 'exe', 'bat', 'com', 'tbn', 'jpg', 'png', 'gif', 'info', 'db', 'srr'] - filesystem.py:56
2010-11-14 14:30 INFO - removing download directory '/Users/plex/downloads/complete/TV/An Idiot Abroad S01E08 WS PDTV XviD aAF' - episode_sort.py:428
SUCCESS, downloaded episode sorted!
Any help would be amazing.

Cheers

pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Media Rover

Post by pilGrim »

Hi Kierse,

Hopefully life is not to crazy busy for you.

When you get time to work on Mediarover, I am still having issues with the sort bat file.

Last try gave me this:

'RREM' is not recognized as an internal or external command,
operable program or batch file.
2010-11-15 05:28 INFO - --- STARTING --- - __init__.py:622
ERROR: incorrect number of arguments!
Usage: mediarover.py episode-sort [options] result_dir [nzb_name nice_name newzbin_id category newsgroup status] [low|medium|high]


Not sure which support file has the RREM typo, or if it even has an impact on the error.

My Sort.bat looks like this:

REM filesystem path where Media Rover is installed
SET ROOT=C:\Users\Admin\Mediarover

REM filesystem path to python installation
SET PYTHON=%HOMEDRIVE%\Python26\pythonw.exe

RREM filesystem path to configuration directory
IF DEFINED LOCALAPPDATA (
REM Vista and newer
SET CONFIG=%LOCALAPPDATA%\Mediarover
) ELSE (
REM XP
SET CONFIG=%APPDATA%\Mediarover
)

REM invoke Media Rover episode sorting script
%PYTHON% %ROOT%\mediarover.py episode-sort -c "%CONFIG%" %1 %2 %3 %4 %5 %6 %7


Appreciate a heads up of there is anything on my end I can do to fix this.  It is a key feature I really want to get working.

Cheers,

Greg

Lockzi
Newbie
Newbie
Posts: 30
Joined: October 10th, 2009, 7:08 am

Re: Media Rover

Post by Lockzi »

pilGrim wrote: Hi Kierse,

Hopefully life is not to crazy busy for you.

When you get time to work on Mediarover, I am still having issues with the sort bat file.

Last try gave me this:

'RREM' is not recognized as an internal or external command,
operable program or batch file.
2010-11-15 05:28 INFO - --- STARTING --- - __init__.py:622
ERROR: incorrect number of arguments!
Usage: mediarover.py episode-sort [options] result_dir [nzb_name nice_name newzbin_id category newsgroup status] [low|medium|high]


Not sure which support file has the RREM typo, or if it even has an impact on the error.

My Sort.bat looks like this:

REM filesystem path where Media Rover is installed
SET ROOT=C:\Users\Admin\Mediarover

REM filesystem path to python installation
SET PYTHON=%HOMEDRIVE%\Python26\pythonw.exe

RREM filesystem path to configuration directory
IF DEFINED LOCALAPPDATA (
REM Vista and newer
SET CONFIG=%LOCALAPPDATA%\Mediarover
) ELSE (
REM XP
SET CONFIG=%APPDATA%\Mediarover
)

REM invoke Media Rover episode sorting script
%PYTHON% %ROOT%\mediarover.py episode-sort -c "%CONFIG%" %1 %2 %3 %4 %5 %6 %7


Appreciate a heads up of there is anything on my end I can do to fix this.  It is a key feature I really want to get working.

Cheers,

Greg
Your bat file has an error in it.

Code: Select all

RREM filesystem path to configuration directory
should be

Code: Select all

REM filesystem path to configuration directory
Easy enough, how does it work for you?

pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Media Rover

Post by pilGrim »

Lockzi wrote:
Your bat file has an error in it.

Code: Select all

RREM filesystem path to configuration directory
should be

Code: Select all

REM filesystem path to configuration directory
Easy enough, how does it work for you?
Hi Lockzi,

not sure how I missed the rem statement typo or even how it got into my bat file, but that is not the error.  I fixed it and I basically get an error that refers to a wrong number of arguments.  I am going to upgrade my Sabnzbd to see if that helps as i am a few increment version behind. 

I did install media rover from scratch and the latest pull had this line  to call the sort bat:
%PYTHON% %ROOT%\mediarover.py episode-sort -c "%CONFIG%" %*

Which is different from my old version which reads:
%PYTHON% %ROOT%\mediarover.py episode-sort -c "%CONFIG%" %1 %2 %3 %4 %5 %6 %7

Not sure the correct number of arguments after the %CONFIG% statement. 

I am not using any quality checking and earlier errors did refer to quality checking low/med/high, maybe one of the arguments needs to be removed if you are not invoking quality checking?

Greg

Lockzi
Newbie
Newbie
Posts: 30
Joined: October 10th, 2009, 7:08 am

Re: Media Rover

Post by Lockzi »

Greg,

this is what my episode_sort.bat looks like.

Code: Select all

@echo off
REM filesystem path where Media Rover is installed
SET ROOT=T:\Pre-Process\Media Rover

REM filesystem path to python installation
SET PYTHON=%HOMEDRIVE%\Python26\pythonw.exe

REM filesystem path to configuration directory
IF DEFINED LOCALAPPDATA (
	REM Vista and newer
	SET CONFIG=T:\Pre-Process\Media Rover\conf
) ELSE (
	REM XP
	SET CONFIG=T:\Pre-Process\Media Rover\conf
)

ECHO Argument 1: %1
ECHO Argument 2: %2
ECHO Argument 3: %3
ECHO Argument 4: %4
ECHO Argument 5: %5
ECHO Argument 6: %6
ECHO Argument 7: %7

REM invoke Media Rover episode sorting script
%PYTHON% "%ROOT%\mediarover.py" episode-sort -c "%CONFIG%" %1
There has been some modifications done from the original.

Works perfect on:
SABnzbd Version: 0.5.4
MediaRover Version: 0.5.3

Hope this helps!

pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Media Rover

Post by pilGrim »

pilGrim wrote:
I did install media rover from scratch and the latest pull had this line  to call the sort bat:
%PYTHON% %ROOT%\mediarover.py episode-sort -c "%CONFIG%" %*

Which is different from my old version which reads:
%PYTHON% %ROOT%\mediarover.py episode-sort -c "%CONFIG%" %1 %2 %3 %4 %5 %6 %7
Read back a few pages and found the exchange between Lockzi and Kierse that seems to describe my issue.  I am testing again, with the "%CONFIG%" %1 as the only argument.  I guess my only question is that if this works, does it cause any issues longer term?  I suppose I won't mess around with quality checking for a while so hopefully this works and there is a stable quality check/sort feature by the time I check it out.

If the above does not work I will report back, but am confident it will.

Greg

pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Media Rover

Post by pilGrim »

Lockzi wrote: Greg,

this is what my episode_sort.bat looks like.

There has been some modifications done from the original.

Works perfect on:
SABnzbd Version: 0.5.4
MediaRover Version: 0.5.3

Hope this helps!
Hi Lockzi, yes that did the trick.  Looks like I was writing my last post when you put up this reply.  I did see your bat file from a previous page and instereted the echo statements and can now see that arguments 6 & 7 are empty for me.  so I guess I could put back in 2 - 5, but all seems to work now.

Thanks,

Greg

User avatar
kierse
Sr. Member
Sr. Member
Posts: 254
Joined: March 5th, 2009, 11:59 pm
Location: Canada
Contact:

Re: Media Rover

Post by kierse »

Hey jansverre,
jansverre wrote: is there some problem with this on server2008? :) That you know of :p
Not that I know of, though I admit I haven't tested MR on Windows Server 2008.  Is this still causing you an issue?  Can you post any of the errors you are getting?

Kierse

User avatar
kierse
Sr. Member
Sr. Member
Posts: 254
Joined: March 5th, 2009, 11:59 pm
Location: Canada
Contact:

Re: Media Rover

Post by kierse »

Hey Poag,
Poag wrote: Your example episode_sort.sh is what I currently use to get MR running at the end of a download. Could I insert a call into this which would run another script then go back and let MR move the files after the conversion has finished?
I'm looked particularly at this script https://forums.sabnzbd.org/index.php?topic=5146.0. I have removed the final 'mv' section and the itunes notifyer, but am unsure as to how to call this script from sab and be sure that MR also gets its due.
Put the handbrake script before the call to the MR sorting script but do the following:

1. modify the handbrake script to put the newly transcoded file in the same directory.
2. then have it remove the originally downloaded episode (once it has been transcoded)
3. finally, call the sort script as per usual

Hopefully, what will happen here is that the original episode will be removed and a new ipod friendly version will be left in its place.  MR will find this episode and sort it like any other episode it finds.

Good luck!

Kierse

User avatar
kierse
Sr. Member
Sr. Member
Posts: 254
Joined: March 5th, 2009, 11:59 pm
Location: Canada
Contact:

Re: Media Rover

Post by kierse »

Hi pilGrim,

Sorry for taking so long to get back to you. Life has indeed been quite busy  :-\
pilGrim wrote: Hi Lockzi, yes that did the trick.  Looks like I was writing my last post when you put up this reply.  I did see your bat file from a previous page and instereted the echo statements and can now see that arguments 6 & 7 are empty for me.  so I guess I could put back in 2 - 5, but all seems to work now.
Just in case you didn't see the explanation in the previous pages, here goes:

The problem only affects Windows users who are using an indexing source other than Newzbin.  When SABnzbd calls a post processing script, it passes 7 arguments one of which is the Newzbin ID.  This argument gets passed regardless if the download had a Newzbin ID or not.  In the case of a job without an ID, SAB passes an empty argument.  The problem occurs in Windows because batch doesn't seem to recognize that it was given an empty argument and so only gives 6 arguments to the sorting script.  Unfortunately for us, the Newzbin ID is the 4 or 5th argument which means that everything that comes after it is shifted by one in the case where there is no ID.  This really shouldn't have been a problem and a while back I modified the sorting script to handle the situation.  For whatever reason (and I can't recall why now), the solution didn't work and Windows users were then getting errors saying that the sorting script wasn't given enough arguments.  The really dumb thing is that the only argument I really need is the first one, the path to the download folder, which is why doing the following:

Code: Select all

... "%CONFIG%" %1
works as it does.  The only drawback of using this solution is that If you manually call the sorting script and specify a quality, MR won't be given your overriding quality.  There is some good news though: I've solved the problem permanently (I hope) and the update is available on the dev branch.  Hopefully, I'll be packaging a new release in the next few days/weeks which will include the fix.

Kierse

g1zm0
Newbie
Newbie
Posts: 24
Joined: February 7th, 2010, 7:57 am

Re: Media Rover

Post by g1zm0 »

g1zm0 wrote: Hi Kierse,

Small problem, probably something simple. The episode sort script isnt delivering the episodes to the correct location. I have 3 TV drives and everything is being dumped onto the second one regardless of existing folders.

Here is the log from SABNZBD

Code: Select all

An Idiot Abroad S01E08 WS PDTV XviD aAF

2010-11-14 14:29 INFO - --- STARTING --- - episode_sort.py:138
2010-11-14 14:29 INFO - begin processing tv directory: /Volumes/TV II/TV II - series.py:493
2010-11-14 14:29 INFO - begin processing tv directory: /Volumes/TV III/TV III - series.py:493
2010-11-14 14:29 INFO - begin processing tv directory: /Volumes/TV I/TV I - series.py:493
2010-11-14 14:29 INFO - watching 36 tv show(s) - episode_sort.py:242
2010-11-14 14:29 INFO - found download file at '/Users/plex/downloads/complete/TV/An Idiot Abroad S01E08 WS PDTV XviD aAF/aaf-an.idiot.abroad.s01e08.pdtv.avi' - episode_sort.py:271
2010-11-14 14:29 INFO - scanning filesystem for episodes belonging to 'An Idiot Abroad'... - series.py:256
2010-11-14 14:29 INFO - attempting to move episode file... - episode_sort.py:361
2010-11-14 14:30 INFO - downloaded episode moved from '/Users/plex/downloads/complete/TV/An Idiot Abroad S01E08 WS PDTV XviD aAF/aaf-an.idiot.abroad.s01e08.pdtv.avi' to '/Volumes/TV II/TV II/An Idiot Abroad/Season 01/s01e08.avi' - episode_sort.py:370
2010-11-14 14:30 INFO - scanning filesystem for episodes belonging to 'An Idiot Abroad'... - series.py:256
2010-11-14 14:30 INFO - checking filesystem for duplicate or multipart episode redundancies... - episode_sort.py:394
2010-11-14 14:30 INFO - cleaning path '/Users/plex/downloads/complete/TV/An Idiot Abroad S01E08 WS PDTV XviD aAF' of the extensions ['nfo', 'txt', 'sfv', 'srt', 'nzb', 'idx', 'log', 'par', 'par2', 'exe', 'bat', 'com', 'tbn', 'jpg', 'png', 'gif', 'info', 'db', 'srr'] - filesystem.py:56
2010-11-14 14:30 INFO - removing download directory '/Users/plex/downloads/complete/TV/An Idiot Abroad S01E08 WS PDTV XviD aAF' - episode_sort.py:428
SUCCESS, downloaded episode sorted!
Any help would be amazing.

Cheers

:-( new problem now.

Woke up this morning to find that it was failing on schedule command:

Code: Select all

2010-11-22 08:37 DEBUG - checking queue version: http://192.168.0.109:8080/sabnzbd/api?mode=version - __init__.py:248
2010-11-22 08:37 ERROR - [Errno socket error] [Errno 8] nodename nor servname provided, or not known - schedule.py:108
Traceback (most recent call last):
  File "/Users/plex/mediarover/mediarover/command/schedule.py", line 106, in schedule
    __schedule(broker, options)
  File "/Users/plex/mediarover/mediarover/command/schedule.py", line 230, in __schedule
    queue = init(params['root'], supported_categories, params)
  File "/Users/plex/mediarover/mediarover/queue/sabnzbd/__init__.py", line 260, in __init__
    self.__version_check()
  File "/Users/plex/mediarover/mediarover/queue/sabnzbd/__init__.py", line 250, in __version_check
    response = urllib.urlopen(url)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 87, in urlopen
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 203, in open
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 310, in open_http
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 1555, in proxy_bypass
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 1421, in proxy_bypass_macosx_sysconf
IOError: [Errno socket error] [Errno 8] nodename nor servname provided, or not known
 

Any ideas, no idea what ive changed or installed?

Thanks

pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Media Rover

Post by pilGrim »

kierse wrote: Hi pilGrim,

Sorry for taking so long to get back to you. Life has indeed been quite busy  :-\

Kierse
No worries at all, I figured as much.  Just glad to know that you are keeping mediarover moving forward.  I have tried sickbeard and a few others, but mediarover works best for me.

Many thanks for all the effort on this!!

Greg

pilGrim
Full Member
Full Member
Posts: 116
Joined: January 9th, 2009, 7:28 pm
Location: Hong Kong, SAR China

Re: Media Rover

Post by pilGrim »

Is anyone having issues with newzbin?

I am getting the following error when mediarover tries to pass a newzbin match to SABnzbd:

http://www.newzbin.com/browse/post/#######/nzb/ - URL Fetching failed; Unusable NZB file


If I past the url directly into my browser the nzb will download no problem.


TIA,

Greg

Post Reply