Media Rover
Re: Media Rover
Hello again. I have tried changing the tv dirs, but it is still trying to move it to the full hd. So I'll reorganize the disks and hope I don't run out of space until a new version with free space chek is out
again.. love mediarover
jansverre
again.. love mediarover
jansverre
Re: Media Rover
I went through the commit logs and your version does closely resemble a very early version of the windows batch file provided with MR. There have been a several changes to it since then so I'd suggest using the latest verison.g1zm0 wrote: I thought that WAS the script included with media rover?? lol!
Kierse
Re: Media Rover
I'll try and come up with a solution for you in the next couple of daysjansverre wrote: Hello again. I have tried changing the tv dirs, but it is still trying to move it to the full hd. So I'll reorganize the disks and hope I don't run out of space until a new version with free space chek is out
again.. love mediarover
jansverre
Kierse
Re: Media Rover
Ok, last question i promise, if i cant do it after this ill give up and go back to the amiga.
Im using the script provided with the latest code, but getting this error:
Im using the script provided with the latest code, but getting this error:
Code: Select all
2010-07-16 01:39 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
Examples:
Manual use:
==========
Manually sort a downloaded file:
> python mediarover.py episode-sort /path/to/some.download
Same as above, but use a non-default config directory:
> python mediarover.py episode-sort --config /path/to/config/dir /path/to/some.download
Manually sort a downloaded file, but specify an overriding quality level: (low/medium/high)
> python mediarover.py episode-sort /path/to/some.download high
Simulate sorting a downloaded file:
> python mediarover.py episode-sort --dry-run /path/to/some.download
From shell script : (called by SABnzbd)
==================
Sort a downloaded file:
> python mediarover.py episode-sort /path/to/some.download some.download.nzb some.download 12345 tv alt.public.access.tv 0
Last edited by g1zm0 on July 15th, 2010, 7:49 pm, edited 1 time in total.
Re: Media Rover
Hey g1zm0,
1. open the sorting log file located in your mediarover config directory (sabnzbd_episode_sort_logging.conf). Find/copy/paste the logging data from the last time it ran. Hint it starts with '--- STARTING ---'
2. It's entirely possible there is something wrong with the shell script. Add the following to your episode_sort.bat script:
This will print the arguments given by SAB when the script is called. Try downloading something again and wait for SAB to call the script. Post the captured logging output here.
Kierse
Don't jump ship yet, we'll figure it out! I rely on you Windows users to tell me when something is wrong with MR. Ok, there are two things I want you to do for me:g1zm0 wrote: Ok, last question i promise, if i cant do it after this ill give up and go back to the amiga.
Im using the script provided with the latest code, but getting this error:
Code: Select all
2010-07-16 01:39 INFO - --- STARTING --- - __init__.py:622 ERROR: incorrect number of arguments! ...
1. open the sorting log file located in your mediarover config directory (sabnzbd_episode_sort_logging.conf). Find/copy/paste the logging data from the last time it ran. Hint it starts with '--- STARTING ---'
2. It's entirely possible there is something wrong with the shell script. Add the following to your episode_sort.bat script:
Code: Select all
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
Kierse
Re: Media Rover
Ok. This is from the log file in the media rover config folder:
and this is from SAB
Fingers crossed
Code: Select all
2010-07-16 19:48 INFO - --- STARTING --- - __init__.py:622
2010-07-16 19:48 DEBUG - using config directory: C:\Users\Barry\AppData\Local\Mediarover - __init__.py:623
2010-07-16 19:48 DEBUG - C:\SCRIPTS\Mediarover\mediarover.py episode-sort 'F:\USENET\FINISHED\The IT Crowd S04E03 WS PDTV XviD RiVER.1' 'The IT Crowd S04E03 WS PDTV XviD RiVER.nzb' 'The IT Crowd S04E03 WS PDTV XviD RiVER' 'tvmr' 'alt.binaries.teevee' '0' - __init__.py:625
and this is from SAB
Code: Select all
The IT Crowd S04E03 WS PDTV XviD RiVER
2010-07-16 19:48 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
Examples:
Manual use:
==========
Manually sort a downloaded file:
> python mediarover.py episode-sort /path/to/some.download
Same as above, but use a non-default config directory:
> python mediarover.py episode-sort --config /path/to/config/dir /path/to/some.download
Manually sort a downloaded file, but specify an overriding quality level: (low/medium/high)
> python mediarover.py episode-sort /path/to/some.download high
Simulate sorting a downloaded file:
> python mediarover.py episode-sort --dry-run /path/to/some.download
From shell script : (called by SABnzbd)
==================
Sort a downloaded file:
> python mediarover.py episode-sort /path/to/some.download some.download.nzb some.download 12345 tv alt.public.access.tv 0
Argument 1: "F:\USENET\FINISHED\The IT Crowd S04E03 WS PDTV XviD RiVER.1"
Argument 2: "The IT Crowd S04E03 WS PDTV XviD RiVER.nzb"
Argument 3: "The IT Crowd S04E03 WS PDTV XviD RiVER"
Argument 4: tvmr
Argument 5: alt.binaries.teevee
Argument 6: 0
Argument 7:
Fingers crossed
Re: Media Rover
Ok, I see the problem. Not why it's happening but the cause of the error you are seeing.g1zm0 wrote:...Code: Select all
2010-07-16 19:48 DEBUG - C:\SCRIPTS\Mediarover\mediarover.py episode-sort 'F:\USENET\FINISHED\The IT Crowd S04E03 WS PDTV XviD RiVER.1' 'The IT Crowd S04E03 WS PDTV XviD RiVER.nzb' 'The IT Crowd S04E03 WS PDTV XviD RiVER' 'tvmr' 'alt.binaries.teevee' '0' - __init__.py:625
Code: Select all
Argument 1: "F:\USENET\FINISHED\The IT Crowd S04E03 WS PDTV XviD RiVER.1" Argument 2: "The IT Crowd S04E03 WS PDTV XviD RiVER.nzb" Argument 3: "The IT Crowd S04E03 WS PDTV XviD RiVER" Argument 4: tvmr Argument 5: alt.binaries.teevee Argument 6: 0 Argument 7:
Only 6 arguments are being passed to MR. When being called by SAB, it expects 7 arguments. If you were missing the last argument (status), it would indicate that you are running a pre 0.5.x version of SAB. Since the status value is being passed, I know you are running 0.5.0 or greater. The problem is that the indexing report number isn't there. Normally, when there isn't a report number, SAB passes an empty argument. For some reason you aren't getting it.
Can you post a copy of your shell script again? I just want to make sure there isn't anything amiss there. Also, what version of MR and SAB are you running? And what version of Windows?
Kierse
Re: Media Rover
Here is the shell script
Windows - Vista
SAB- 0.5.3
MR- 0.5.0
Code: Select all
@ECHO OFF
REM Copyright 2009 Kieran Elliott <[email protected]>
REM
REM Media Rover is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM Media Rover is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.
REM
REM OSX hack: SABnzbd on Mac OSX comes bundled with all Python libraries
REM necessary for its function. Because of this, SABnzbd sets PYTHONHOME
REM to point to its own Python libraries. This causes a problem for Media
REM Rover due to the fact that some of the key Python libraries are not
REM bundled. Therefore, we delete PYTHONHOME before invoking Media Rover
REM filesystem path where Media Rover is installed
SET ROOT=C:\SCRIPTS\Mediarover
REM filesystem path to python installation
SET PYTHON=C:\Python26\pythonw.exe
REM filesystem path to configuration directory
IF DEFINED LOCALAPPDATA (
REM Vista and newer
SET CONFIG=C:\Users\Barry\AppData\Local\Mediarover
) ELSE (
REM XP
SET CONFIG=C:\Users\Barry\AppData\Local\Mediarover
)
REM invoke Media Rover episode sorting script
%PYTHON% C:\SCRIPTS\Mediarover\mediarover.py episode-sort -c "%CONFIG%" %1 %2 %3 %4 %5 %6 %7
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
SAB- 0.5.3
MR- 0.5.0
Re: Media Rover
Hey g1zm0,
Let me know how it goes
Kierse
Sorry for the late reply, but I've got a solution for you. Apparently (and I don't know why this issue hasn't come up before) Windows batch files don't register empty command line arguments the same way bash/sh does under Linux/OS X. When SAB calls episode_sort.bat with 7 arguments and one of them is empty (because the nzb isn't from newzbin, sab passes a blank argument in place of the newzbin id), the batch file only registers 6 arguments. The batch file continues happily along and tries to pass 7 arguments to MR. MR expects 7 and generates the error you've been getting when it only gets 6. I updated the example shell script to call MR in a slightly different way and updated MR to figure things out and continue running when it only gets 6 arguments. I've committed the updates to the dev branch and will hopefully release 0.5.1 in the next few days / week. In the meantime, you can download the code including the fix for your problem here: http://github.com/kierse/mediarover/zipball/devg1zm0 wrote: No luck?
Let me know how it goes
Kierse
Re: Media Rover
Did a fresh re-install and pulled the pertinent info over from my last config file (manually). I now get this when running python mediarover.py schedule
I am using this feed structure: http://services.nzbmatrix.com/rss.php?p ... &subcat=41 as generated by nzbmatrix's feed generator (http://services.nzbmatrix.com/)
Does that mean something is wrong with my rss feed as configured? I have the username, api key, and everything that was working before.
I am using this feed structure: http://services.nzbmatrix.com/rss.php?p ... &subcat=41 as generated by nzbmatrix's feed generator (http://services.nzbmatrix.com/)
Code: Select all
[~/.mediarover] # python ~/.mediarover/mediarover.py schedule
2010-07-21 10:00 INFO - --- STARTING --- - __init__.py:208
2010-07-21 10:00 INFO - begin processing tv directory: /share/Qmultimedia/TV - series.py:464
2010-07-21 10:00 INFO - watching 37 tv show(s) - __init__.py:249
2010-07-21 10:00 INFO - begin processing sources - __init__.py:255
2010-07-21 10:00 INFO - created source 'nzbmatrix_HD_TV' - __init__.py:290
2010-07-21 10:00 INFO - watching 1 source(s) - __init__.py:300
2010-07-21 10:00 INFO - begin queue configuration - __init__.py:303
2010-07-21 10:00 INFO - retrieving delayed items... - __init__.py:379
2010-07-21 10:00 INFO - processing 'nzbmatrix_HD_TV' items - __init__.py:386
2010-07-21 10:00 ERROR - list index out of range - __init__.py:1021
Traceback (most recent call last):
File "/root/.mediarover/mediarover/__init__.py", line 212, in scheduler
__scheduler(broker, options)
File "/root/.mediarover/mediarover/__init__.py", line 389, in __scheduler
items = source.items()
File "/root/.mediarover/mediarover/source/newzbin/__init__.py", line 38, in items
if self.type().upper() == rawItem.getElementsByTagName("report:category")[0].childNodes[0].data.upper():
IndexError: list index out of range
Traceback (most recent call last):
File "/root/.mediarover/mediarover.py", line 19, in <module>
mediarover.run()
File "/root/.mediarover/mediarover/__init__.py", line 75, in run
scheduler(broker, args)
File "/root/.mediarover/mediarover/__init__.py", line 212, in scheduler
__scheduler(broker, options)
File "/root/.mediarover/mediarover/__init__.py", line 389, in __scheduler
items = source.items()
File "/root/.mediarover/mediarover/source/newzbin/__init__.py", line 38, in items
if self.type().upper() == rawItem.getElementsByTagName("report:category")[0].childNodes[0].data.upper():
IndexError: list index out of range
Last edited by avatarr on July 21st, 2010, 10:06 am, edited 1 time in total.
Re: Media Rover
Hey avatarr,
1. There is a bug in MR
2. You specified the source provider as 'newzbin' (rather than nzbmatrix) for the source titled 'nzbmatrix_HD_TV'
It it's not a configuration error, I'll need to track down the problem. Can you post the relevant source section here for me? You can replace the source url with the one you used above if you like.
Kierse
For some reason MR is attempting to use the Newzbin source plugin to process the nzbmatrix RSS data. This could be caused by one of two reasons:avatarr wrote: Did a fresh re-install and pulled the pertinent info over from my last config file (manually). I now get this when running python mediarover.py schedule
I am using this feed structure: http://services.nzbmatrix.com/rss.php?p ... &subcat=41 as generated by nzbmatrix's feed generator (http://services.nzbmatrix.com/)
Does that mean something is wrong with my rss feed as configured? I have the username, api key, and everything that was working before.Code: Select all
2010-07-21 10:00 ERROR - list index out of range - __init__.py:1021 ... File "/root/.mediarover/mediarover/source/newzbin/__init__.py", line 38, in items if self.type().upper() == rawItem.getElementsByTagName("report:category")[0].childNodes[0].data.upper(): IndexError: list index out of range Traceback (most recent call last): File "/root/.mediarover/mediarover.py", line 19, in <module> mediarover.run() File "/root/.mediarover/mediarover/__init__.py", line 75, in run scheduler(broker, args) File "/root/.mediarover/mediarover/__init__.py", line 212, in scheduler __scheduler(broker, options) File "/root/.mediarover/mediarover/__init__.py", line 389, in __scheduler items = source.items() File "/root/.mediarover/mediarover/source/newzbin/__init__.py", line 38, in items if self.type().upper() == rawItem.getElementsByTagName("report:category")[0].childNodes[0].data.upper(): IndexError: list index out of range
1. There is a bug in MR
2. You specified the source provider as 'newzbin' (rather than nzbmatrix) for the source titled 'nzbmatrix_HD_TV'
It it's not a configuration error, I'll need to track down the problem. Can you post the relevant source section here for me? You can replace the source url with the one you used above if you like.
Kierse
Re: Media Rover
Yeah, I'm an idiot. I had it set as newzbin and not nzbmatrix. Thanks for pointing out the obvious and for putting up with my noobness. I was racking my brain and must have wiped / reinstalled 6 times trying to figure out what the heck was going on. Also, thanks for your quick response and kick-ass app.
kierse wrote: Hey avatarr,
For some reason MR is attempting to use the Newzbin source plugin to process the nzbmatrix RSS data. This could be caused by one of two reasons:avatarr wrote: Did a fresh re-install and pulled the pertinent info over from my last config file (manually). I now get this when running python mediarover.py schedule
I am using this feed structure: http://services.nzbmatrix.com/rss.php?p ... &subcat=41 as generated by nzbmatrix's feed generator (http://services.nzbmatrix.com/)
Does that mean something is wrong with my rss feed as configured? I have the username, api key, and everything that was working before.Code: Select all
2010-07-21 10:00 ERROR - list index out of range - __init__.py:1021 ... File "/root/.mediarover/mediarover/source/newzbin/__init__.py", line 38, in items if self.type().upper() == rawItem.getElementsByTagName("report:category")[0].childNodes[0].data.upper(): IndexError: list index out of range Traceback (most recent call last): File "/root/.mediarover/mediarover.py", line 19, in <module> mediarover.run() File "/root/.mediarover/mediarover/__init__.py", line 75, in run scheduler(broker, args) File "/root/.mediarover/mediarover/__init__.py", line 212, in scheduler __scheduler(broker, options) File "/root/.mediarover/mediarover/__init__.py", line 389, in __scheduler items = source.items() File "/root/.mediarover/mediarover/source/newzbin/__init__.py", line 38, in items if self.type().upper() == rawItem.getElementsByTagName("report:category")[0].childNodes[0].data.upper(): IndexError: list index out of range
1. There is a bug in MR
2. You specified the source provider as 'newzbin' (rather than nzbmatrix) for the source titled 'nzbmatrix_HD_TV'
It it's not a configuration error, I'll need to track down the problem. Can you post the relevant source section here for me? You can replace the source url with the one you used above if you like.
Kierse
Re: Media Rover
Is there any way to use the sorting function to batch-rename episodes that reside in the same folder?
Last edited by avatarr on February 4th, 2011, 12:27 am, edited 1 time in total.
Re: Media Rover
Kierse! Thanks for getting back to me. Ive attempted to launch the newly updated episode_sort.sh but am having difficulties getting it to run in windows? Is it possible to make a similar change to the .bat file?
Thanks!
Thanks!
kierse wrote: Hey g1zm0,
Sorry for the late reply, but I've got a solution for you. Apparently (and I don't know why this issue hasn't come up before) Windows batch files don't register empty command line arguments the same way bash/sh does under Linux/OS X. When SAB calls episode_sort.bat with 7 arguments and one of them is empty (because the nzb isn't from newzbin, sab passes a blank argument in place of the newzbin id), the batch file only registers 6 arguments. The batch file continues happily along and tries to pass 7 arguments to MR. MR expects 7 and generates the error you've been getting when it only gets 6. I updated the example shell script to call MR in a slightly different way and updated MR to figure things out and continue running when it only gets 6 arguments. I've committed the updates to the dev branch and will hopefully release 0.5.1 in the next few days / week. In the meantime, you can download the code including the fix for your problem here: http://github.com/kierse/mediarover/zipball/devg1zm0 wrote: No luck?
Let me know how it goes
Kierse